|
Hello, I am looking for a reliable and easy way to determine if the Operating System on the target computer is running a 64-bit or 32-bit Operating System in a Setup and Deployment project. Not really looking to learn WMI or C++, there has to be something simpler than the posts I have seen in this forum.
Thanks in advance!
Tim |
| TimSt5012435 Tuesday, July 07, 2009 5:13 AM |
Hi Tim,
You can use the public property VersionNT64 defined by Windows Installer to determine if the OS on the target machine is 64-bit or not.
FYI, the following MSDN document list all public properties defined by Windows Installer: http://msdn.microsoft.com/en-us/library/aa370905(VS.85).aspx
Hope this helps.
Sincerely, Linda Liu
Please remember to mark the replies as answers if they help and unmark them if they provide no help. Send us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.- Marked As Answer byTimSt5012435 Tuesday, July 07, 2009 2:21 PM
-
|
| Linda Liu Tuesday, July 07, 2009 9:30 AM |
Hi Tim,
You can use the public property VersionNT64 defined by Windows Installer to determine if the OS on the target machine is 64-bit or not.
FYI, the following MSDN document list all public properties defined by Windows Installer: http://msdn.microsoft.com/en-us/library/aa370905(VS.85).aspx
Hope this helps.
Sincerely, Linda Liu
Please remember to mark the replies as answers if they help and unmark them if they provide no help. Send us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.- Marked As Answer byTimSt5012435 Tuesday, July 07, 2009 2:21 PM
-
|
| Linda Liu Tuesday, July 07, 2009 9:30 AM |
Thanks Linda!
Tim |
| TimSt5012435 Tuesday, July 07, 2009 2:22 PM |
HI Liu I do not want to be rude but do you have working examples of this. I am trying to limit my install to XP 32 bit or any verison of Vista or higher and I have received several versons of VersionNT>=501 or VersionNT64>=600. I do not know if they were tested but this does not work. MSDN says the VersionNT64 is undefind on a 32 bit os and this appears to be causing the problem. I have tried vereiations of VersionNT=501 and VersionNT64="" or VersionNT>=600 and VersionNT64="" but could not get this to work.
So I am back to any one who know a launch condition that will limit the os to XP32 or vista and higher.
|
| BarberColman Wednesday, September 02, 2009 5:24 PM |
Barber, your use of VersionNT64 is incorrect. The test should be NOT VersionNT64. To combine this check with another the syntax would be NOT VersionNT64 AND VersionNT>=600.
Hope this helps.
Tim |
| TimSt5012435 Wednesday, September 02, 2009 6:10 PM |
Tim If I say NOT VersionNT64 I will not be able to install on Vista or win 7 64 bit. I think the problem is back to the undefined issue. Maybe the not will help.
The closes I got to working was something like.
VersionNT=501 and VersionNT64="". This allows installs on XP32 and not on XP64
I hoped adding a check for Vista or greater and not a 64bit and a check for not 32 and Vista 64 or newer would work
VersionNT=501 and VersionNT64="" or VersionNT>=600 and VersionNT64="" orVersionNT="" and VersionNT64>=600. This failed.
I will try a version with not.
|
| BarberColman Thursday, September 03, 2009 5:29 PM |