cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ChristopheOce
Level 7

How to detect if the computer is a x64 machine ?!

Hi,

I have a basic msi project.
Is it possible during the install to know if the machine is on x64 or not !?
create a launch condition but how i can detect the x64 !?

Have you got any idea ?!

thanks for all
Christophe
Labels (1)
0 Kudos
(5) Replies
bplivard
Level 4

Hi,

Though I'm a new user, I've been paying a lot with setup prerequisites and system search.
If you go for a setup prerequisite, in the Prerequisite condition, when you select "Setup is running on a specified platform", there already are a number of entries for X64 processor architectures you may choose from.

If you go for a system search, according to Microsoft, you may check the processor architecture from this registry key and its value:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE.

I hope this helps.
0 Kudos
Holger_G
Level 10

You can use the 'VersionNT64' property as a condition.
0 Kudos
ChristopheOce
Level 7

Hi both,

thanks for your information.
On the registry i can check if the computer is a x64 or not !

I have a virtual machine vlm who is a windows xp sp2 x64 !

If i go to the registry i can see that's there is a x64 bits.

but there is a one thing i can't understand !

if i execute this custom action on the next button on my basic msi :
this custom action gets the property versionnt64


function IsItX64(hMSI)

string szVal, szMsg;
NUMBER cchValueBuf;
begin

cchValueBuf = 512;
MsiGetProperty(hMSI, "VersionNT64", szVal, cchValueBuf);

if(szVal != "") then

switch(szVal)
case "501" :
szMsg = "_ WINDOWS XP _";

case "502" :
szMsg = "_ WIN 2003 _";

case "600" :
szMsg = "_ WIN VISTA _";

default :
szMsg = "_ UNKNOW TYPED _";

endswitch;

//Display the result
MessageBox("Valeur : " + szVal + "Identification : " + szMsg, INFORMATION);

else

MessageBox("Computer is runing under x86.", INFORMATION);

endif;

end;


i obtain it's win 2003 !!! then the pc it's a windows xp !!!

Someone can tell me what's happens ?


Thanks for all
Christophe
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

Windows XP for x64 has the same version number as Windows Server 2003. To tell which you are on you will need to also examine the MsiNTProductType Property - look for the non-server value.
0 Kudos
ChristopheOce
Level 7

Hi Mickael,

that's correct, i've read this yesturday evening on the site microsoft !

Thanks for all
Christophe
0 Kudos