Jump to content

Recommended Posts

Posted

Hi, I am unable to get the following 2 commands to work properly. Keep getting error msg.

Please help

getOSver()=="Win7" {regedit}"%wpipath%\\Install\\cc\\win7 settings.reg"

getOSver()=="XP" {regedit} "%wpipath%\\Install\\cc\\xp settings.reg

or using

{x64} {regedit} "%wpipath%\\Install\\cc\\win7 settings.reg"

{x86} {regedit} "%wpipath%\\Install\\cc\\xp settings.reg"


Posted

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"

Posted

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.

Posted

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.

  • 1 month later...
Posted

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 file

initial 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

  • 4 months later...
Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...