fillalph Posted July 11, 2004 Share Posted July 11, 2004 I did some reading and I saw a post by webmedic I believe.I know that I put quotes around the beginning and end of the data value (just after the last comma). What I am not sure about is with the install shield installers that are the frontend for msi installs.If we used a cmd file to add reg settings to RunOnceEx we had to use \" for every comma except the first and last. When I test my inf file I didn't get the right output.My question is, do I have to do this (the /") for infs also or just one at the beginning and at the end.Ex:HKLM,"%RunOnceEx%\0070",,,"Sun Java VM 1.4.2.03"HKLM,"%RunOnceEx%\0070",1,,"%systemdrive%\installs\common\sunjava\j2re14203.exe /S /v\"/qn ADDLOCAL=jrecore IEXPLORER=1 MOZILLA=1\""or:HKLM,"%RunOnceEx%\0070",,,"Sun Java VM 1.4.2.03"HKLM,"%RunOnceEx%\0070",1,,"%systemdrive%\installs\common\sunjava\j2re14203.exe /S /v"/qn ADDLOCAL=jrecore IEXPLORER=1 MOZILLA=1""or:HKLM,"%RunOnceEx%\0070",,,"Sun Java VM 1.4.2.03"HKLM,"%RunOnceEx%\0070",1,,"%systemdrive%\installs\common\sunjava\j2re14203.exe /S /v/qn ADDLOCAL=jrecore IEXPLORER=1 MOZILLA=1\".Me personally, I think the 2nd one is right, but if an inf expert could give some input, that would be appreciated.Thanks]Bonkers[ Link to comment Share on other sites More sharing options...
fillalph Posted July 11, 2004 Author Share Posted July 11, 2004 Ok,I did some little testing and I can't get it to look how I want.This is how it should be displayed in the registry:C:\installs\common\sunjava\j2re14203.exe /S /v"/qn ADDLOCAL=jrecore IEXPLORER=1 MOZILLA=1" (with the quotes and all).I have tried using just " and then \" and then combinations, but I still can't get it. If someone who uses an inf knows the format of how to get it to import to the registry properly could let me, I would appreciate it.Thanks]Bonkers[ Link to comment Share on other sites More sharing options...
Alanoll Posted July 11, 2004 Share Posted July 11, 2004 HKLM,"%RunOnceEx%\0070",,,"Sun Java VM 1.4.2.03"HKLM,"%RunOnceEx%\0070",1,,"%systemdrive%\installs\common\sunjava\j2re14203.exe /S /v\"/qn ADDLOCAL=jrecore IEXPLORER=1 MOZILLA=1\""should beHKLM,"%RunOnceEx%\0070",,,"Sun Java VM 1.4.2.03"HKLM,"%RunOnceEx%\0070",1,,"%systemdrive%\installs\common\sunjava\j2re14203.exe /S /v"""/qn ADDLOCAL=jrecore IEXPLORER=1 MOZILLA=1"""" Link to comment Share on other sites More sharing options...
fillalph Posted July 11, 2004 Author Share Posted July 11, 2004 Thanks Alanoll. One question though. What is the idea behind it. For example, with the cmds the idea was (from the msfn guide) You will find that if you add additional " " quotation marks in the REG ADD entries, it won't be imported to the Windows Registry. To work around this, use a backslash \" for every quotation you intend to add, for example:.So anytime we had to use a quote inside of a quote we just went /". I don't really understand why there are 3 quotes.Could you possibly do another example that might help explain the idea. (this was from my cmd file):HKLM,"%RunOnceEx%\0101",1,,"%systemdrive%\installs\desktop\apc\setup.exe -s -f1\"%systemdrive%\installs\desktop\apc\setup.iss\""So would this be:HKLM,"%RunOnceEx%\0101",1,,"%systemdrive%\installs\desktop\apc\setup.exe -s -f1"""%systemdrive%\installs\desktop\apc\setup.iss""""?Thanks]Bonkers[ Link to comment Share on other sites More sharing options...
fillalph Posted July 11, 2004 Author Share Posted July 11, 2004 Thanks alanoll for all your help. I understand now (at least I believe) as to how the syntax works. I will try and explain it as best as I can incase anyone else needs this information. (alanoll or anyone else, if I am wrong, PLEASE correct to prevent others from skrewing up).The first " is ok and doesn't need anything special. The second one needs to have two before it. So basically, / = "" in this case. Keep doing this until the last one. Here is where it gets different. Count all the quotes (ignore the "" because they are just basically equal to a /). Now, for the last quotes which closes everything off, you put down "" plus quotes to close of the ones you counted.Hope that helps. If it doesn't really make sense, look at the examples from alanoll above.]Bonkers[ Link to comment Share on other sites More sharing options...
fillalph Posted July 12, 2004 Author Share Posted July 12, 2004 Well, looks like my explaination doesn't work.I can't seem to figure out this one:HKLM,"%RunOnceEx%\0130",1,,"%systemdrive%\installs\desktop\vmware\VMware Workstation.msi /qn USERNAME=bob SERIALNUMBER="""aaaaa-bbbbb-ccccc-dddd""" REBOOT=ReallySuppress"""I think I need an explaination Thanks]Bonkers[ Link to comment Share on other sites More sharing options...
Alanoll Posted July 12, 2004 Share Posted July 12, 2004 lol.....HKLM,"%RunOnceEx%\0130",1,,"%systemdrive%\installs\desktop\vmware\VMware Workstation.msi /qn USERNAME=bob SERIALNUMBER="""aaaaa-bbbbb-ccccc-dddd""" REBOOT=ReallySuppress"""should beHKLM,"%RunOnceEx%\0130",1,,"%systemdrive%\installs\desktop\vmware\VMware Workstation.msi /qn USERNAME=bob SERIALNUMBER="""aaaaa-bbbbb-ccccc-dddd""" REBOOT=ReallySuppress"Think of it this way....you have a RunOnceEX like so...some.exe /s /v\"/qn REBOOT=SUPRESS\"or in Batchsome.exe /s /v"/qn REBOOT=SUPRESS"in INF it would becomesome.exe /s /v"""/qn REBOOT=SUPRESS"""When there are interior quotes like above, you use two additional quotes ("") to make it ("""). Now say your line is surrounded by quotes in the INF to denote a string to import (in a normal INF statement, just after declaring what type of value it is)so instead ofHKLM,"%RunOnceEx%\0101",1,,"some.exe /s /v"/qn REBOOT=SUPRESS""which is improper INF syntax, as there are embedded (interior) quotes, you would replace the embedded quotes with """ so it would becomeHKLM,"%RunOnceEx%\0101",1,,"some.exe /s /v"""/qn REBOOT=SUPRESS""""Help any? Link to comment Share on other sites More sharing options...
neo_3333 Posted July 12, 2004 Share Posted July 12, 2004 I've found that when there are interior quotes like above, one additional quote (") to make it ("") is good enough and I've seen this done in the old win95 powertoys infs.For example,Command line ie. batchsome.exe /s /v"/qn REBOOT=SUPRESS"When using runonceex throught reg addsome.exe /s /v\"/qn REBOOT=SUPRESS\"When using infsome.exe /s /v""/qn REBOOT=SUPRESS""This syntax is inside the quotes which denotes it as a string.Hence,HKLM,"%RunOnceEx%\0101",1,,"some.exe /s /v""/qn REBOOT=SUPRESS""" Link to comment Share on other sites More sharing options...
Alanoll Posted July 12, 2004 Share Posted July 12, 2004 it could work...I was just told the """ way and never had a problem, however what you posted does seem logical. Thanks neo_3333 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now