MSFN Forum: Help regarding {x64} or getosver() - MSFN Forum

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Help regarding {x64} or getosver() Rate Topic: -----

#1 User is offline   illusions 

  • Junior
  • Pip
  • Group: Members
  • Posts: 72
  • Joined: 18-September 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 08 November 2011 - 06:03 PM

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"


#2 User is offline   engmod 

  • Newbie
  • Group: Members
  • Posts: 34
  • Joined: 09-December 08

Posted 08 November 2011 - 07:03 PM

What error message are you getting?

#3 User is offline   illusions 

  • Junior
  • Pip
  • Group: Members
  • Posts: 72
  • Joined: 18-September 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 08 November 2011 - 09:48 PM

View Postengmod, on 08 November 2011 - 07:03 PM, said:

What error message are you getting?




The message is "failed" and the setting.reg file does not get executed.

#4 User is offline   myselfidem 

  • Member
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,397
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 09 November 2011 - 01:16 AM

Try whithout SPACE with the reg name, example:

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

#5 User is offline   illusions 

  • Junior
  • Pip
  • Group: Members
  • Posts: 72
  • Joined: 18-September 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 09 November 2011 - 10:11 AM

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"

#6 User is offline   myselfidem 

  • Member
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,397
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 09 November 2011 - 01:20 PM

Does not work for me also !

getOSver()=="Not found"

#7 User is offline   Kelsenellenelvian 

  • WPI Guru
  • Group: Developers
  • Posts: 8,326
  • Joined: 18-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 13 November 2011 - 04:10 AM

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.

#8 User is offline   Kelsenellenelvian 

  • WPI Guru
  • Group: Developers
  • Posts: 8,326
  • Joined: 18-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 17 November 2011 - 04:43 PM

Adding getosver to the commandlines is getting messy... (Might not happen)

However still looking into adding 2 or more commands to the same line.

#9 User is offline   mritter 

  • WPI Co-Developer
  • Group: Developers
  • Posts: 1,090
  • Joined: 13-November 05

Posted 17 November 2011 - 05:56 PM

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.

#10 User is offline   gilles_gros 

  • Group: Members
  • Posts: 7
  • Joined: 25-August 06

Posted 15 January 2012 - 04:55 AM

View PostKelsenellenelvian, on 17 November 2011 - 04:43 PM, said:

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

#11 User is offline   Francesco 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 394
  • Joined: 20-March 04

Posted 18 May 2012 - 10:22 AM

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.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy