What version of XP? (home, Pro, 2003)
Posted 23 January 2006 - 20:42
I'm hoping there is a more recent solution to this problem that I missed when searching, and someone can point me to it.
I am using Installshield version 6.31.
My problem is the application I am installing is only certified for Windows 2000 and XP Pro, and I need to prevent it from installing on any other OS. I'm using this (SYSINFO.WINNT.bWinXP) but it seems to not know the difference between the various XP's.
Posted 24 January 2006 - 02:06
- KEY: vMAJOR.MINOR = Windows Release
- v5.0 = Windows 2000
- v5.1 = Windows XP
- v5.2 = Windows Server 2003
Now, unfortunately, differentiating between the various _editions_ of a release is NOT as easy. For example, detecting Home Edition vs Professional. As a result, I have not yet actually gotten around to implementing such checks in any of my setups and instead defer to the readme file et al.
However, I've researched the matter previously and I'm told the easiest way is to call the GetVersionEx Windows API. If the VER_SUITE_PERSONAL flag is set in the OSVERSIONINFOEX structure, then it's Home Edition.
For more information on this call and the associated structure, check out this MSDN page.
All that being said though, you really should get access to XP Home Edition and Server 2003 to properly test your setup!
To achieve that for XP Home, maybe you can temporarily borrow the CD from someone or just have 'em take your setup home to check it on such a system. Worst case, break down and spend the $99 or so on an upgrade copy.
Now, to achieve that for Server 2003, you can download a trial copy from MS which would be sufficient for your needs.
Hope it helps then, good luck, and welcome to the site.
Edited by Taco Bell, 24 January 2006 - 02:07.
Posted 24 January 2006 - 03:21
I don't know how I missed GetSystemInfo. However, while experimenting after my initial posting, I found a post that said server was 5.2. This works for XP:
NUMBER nx, ny;
nx = SYSINFO.nWinMajor;
ny = SYSINFO.nWinMinor;
Since this returns 5.1 on my XP Pro PC, and based on you confirming that server is 5.2, it should give me 5.2 for Server. Either way solves part of the problem -- pending a test on server.
I found the post in my earlier search from the person who though they had discovered how to use OSVERSIONINFOEX, but i haven't figured out yet how to call it from Installshield.
I'm a developer who won the lottery when the project manager realized we needed to be able to install this project, so I built an install using the wizard and added a few custom things we needed. So I'm not much of an Installshield guru right now.
thanks again for the help and the pointers.
Posted 24 January 2006 - 09:32
In the latest version you could use SYSINFO.nOSSuiteMask to identify XP Home (VER_SUITE_PERSONAL)
Posted 24 January 2006 - 15:32
As for 2003, he doesn't need to support it. He just needs to detected based on the Windows version number and that's also doable under that same version of IS.
However, I'm glad to hear that they've added built-in calls for detecting the Home Edition to the later versions of IS.
Thereore, I'll also see about adding all this to the FAQ since it's such a popular question.
Edited by Taco Bell, 08 February 2006 - 00:49.
Posted 25 January 2006 - 17:04
|Stefan, as I documented in the FAQ, IS Professional 6.31 officially supports XP.|
Apparently Windows XP is older than I thought
Thanks for the correction. And thanks for the FAQ.