Jump to content

Help regarding {x64} or getosver()


Recommended Posts

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"

Link to comment
Share on other sites


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"

Link to comment
Share on other sites

  • 1 month later...

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

Link to comment
Share on other sites

  • 4 months later...

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.

Link to comment
Share on other sites

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...