cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jarmopy
Level 3

How to test if Windows Server 2003 or 2008

Hi,
Using basic msi installation.
I think this is a trivial question but how to test in Installshield script (setup.rul) if the platform is Windows Server 2003 or Windows Server 2008 (64 bit) ?
I need this because a different registry read handling compared with those plaforms.
In Server 2008 I must use different registry read options than in Server 2003 as said in
http://community.flexerasoftware.com/showthread.php?t=191196&highlight=REGDB_OPTIONS

//This will cause all subsequent registry operations to access the 64-bit section
REGDB_OPTIONS = REGDB_OPTIONS | REGDB_OPTION_WOW64_64KEY; //for 64 bit support,addthis line before you call any registry related API in installscript

REGDB_OPTIONS = REGDB_OPTIONS & ~REGDB_OPTION_WOW64_64KEY; //to revert to 32-bit, add this line after calling the Registry API in installscript.


Thanks in advance
Jarmo
Labels (1)
0 Kudos
(2) Replies
Kelter
Level 10

To test for 64 bit windows, use the VersionNT64 property.

VersionNT values:
http://msdn.microsoft.com/en-us/library/aa370556(VS.85).aspx
0 Kudos
jarmopy
Level 3

Kelter wrote:
To test for 64 bit windows, use the VersionNT64 property.

VersionNT values:
http://msdn.microsoft.com/en-us/library/aa370556(VS.85).aspx


Thanks, this works OK.
0 Kudos