illusions Posted November 9, 2011 Posted November 9, 2011 Hi, I am unable to get the following 2 commands to work properly. Keep getting error msg.Please helpgetOSver()=="Win7" {regedit}"%wpipath%\\Install\\cc\\win7 settings.reg"getOSver()=="XP" {regedit} "%wpipath%\\Install\\cc\\xp settings.regor using{x64} {regedit} "%wpipath%\\Install\\cc\\win7 settings.reg"{x86} {regedit} "%wpipath%\\Install\\cc\\xp settings.reg"
illusions Posted November 9, 2011 Author Posted November 9, 2011 What error message are you getting?The message is "failed" and the setting.reg file does not get executed.
myselfidem Posted November 9, 2011 Posted November 9, 2011 Try whithout SPACE with the reg name, example:{x86} {regedit} "%wpipath%\\Install\\cc\\XPsettings.reg"
illusions Posted November 9, 2011 Author Posted November 9, 2011 Ok I use the following syntax and got the {x86} and {x64} method working {x86} regedit /s "%wpipath%\Install\cc\xpsettings.reg"{x64} regedit /s "%wpipath%\Install\cc\win7settings.reg"however I still cannot get these working using getOSver() method ...getOSver()=="Win7" regedit /s "%wpipath%\Install\cc\win7settings.reg"getOSver()=="XP" regedit /s "%wpipath%\Install\cc\xpsettings.reg"
myselfidem Posted November 9, 2011 Posted November 9, 2011 Does not work for me also ! getOSver()=="Not found"
Kelsenellenelvian Posted November 13, 2011 Posted November 13, 2011 Getosver is mainly for deps and exclusions. Am looking into why it won't add into the command line.Yeah I am aware of the fact 2 or more commands will not work in the same line. Working on that too.
Kelsenellenelvian Posted November 17, 2011 Posted November 17, 2011 Adding getosver to the commandlines is getting messy... (Might not happen)However still looking into adding 2 or more commands to the same line.
mritter Posted November 17, 2011 Posted November 17, 2011 If not using it as a Deps or Cond you have to use {JSCRIPT}{JSCRIPT}=if (getBits()==32) RunCmd('%wpipath%\Install\CCleaner.exe /s',false,true)See the changelog.txt for more examples.
gilles_gros Posted January 15, 2012 Posted January 15, 2012 Adding getosver to the commandlines is getting messy... (Might not happen)However still looking into adding 2 or more commands to the same line.Hi All,Bumping into that problem, I come up with a simple solution.Only in the case of a {X86} or {X64} command, you might have after 1 other command.I did not code the full solution, but a solution that I think fixes most of the cases.Based on that fact, I modified installer.js fileinitial code : case '{X86}': if (getBits()==64) cmd="SKIP0"; cmd=cmd.replace(/{x86} /gi,''); fsoCmd=false; break; case '{X64}': if (getBits()==32) cmd="SKIP0"; cmd=cmd.replace(/{x64} /gi,''); fsoCmd=false; break;Modified code case '{X86}': if (getBits()==64) cmd="SKIP0"; else { cmd=cmd.replace(/{x86} /gi,''); handleCommand(cmd,item,cmdNum); } fsoCmd=false; break; case '{X64}': if (getBits()==32) cmd="SKIP0"; else { cmd=cmd.replace(/{x64} /gi,''); cmd=handleCommand(cmd,item,cmdNum); } fsoCmd=false; break;Hope this helps some of you.Gilles
Francesco Posted May 18, 2012 Posted May 18, 2012 I posted here a modified handleCommand function that allows using {X86} and {X64} in chain of commands and also adds an {OS} filter to run commands only on specific OS versions. This should solve both the problems people were having in this thread.
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