Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

What version of XP? (home, Pro, 2003)


5 replies to this topic

dennis2

dennis2
  • Members
  • 2 posts

Posted 23 January 2006 - 20:42

I searched these forums and came across some discussions of how to tell one version of XP from another, and some suggestions, all posted in 2002 or 2003. After I post this I plan to experiment with them, but I don't have XP Home or Server 2003 so it may be difficult to tell if they work for me.

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.

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 24 January 2006 - 02:06

First off, differentiating between the various _versions_ of Windows is easy. They work out to be the following:
  • KEY: vMAJOR.MINOR = Windows Release
  • v5.0 = Windows 2000
  • v5.1 = Windows XP
  • v5.2 = Windows Server 2003
This can be cross-checked using the GetSystemInfo(OSMAJOR, nResult, szResult) and GetSystemInfo(OSMINOR, nResult, szResult) calls within IS.


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.

user posted image

dennis2

dennis2
  • Members
  • 2 posts

Posted 24 January 2006 - 03:21

Thanks.
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.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 24 January 2006 - 09:32

Note that Professional 6.x is a rather old version of InstallShield 8and I don#t think XP or 2003 are officially supported in that version).
In the latest version you could use SYSINFO.nOSSuiteMask to identify XP Home (VER_SUITE_PERSONAL)

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 24 January 2006 - 15:32

Stefan, as I documented in the FAQ, IS Professional 6.31 officially supports XP.

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.

user posted image

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 25 January 2006 - 17:04

QUOTE
Stefan, as I documented in the FAQ, IS Professional 6.31 officially supports XP.

Apparently Windows XP is older than I thought wink.gif
Thanks for the correction. And thanks for the FAQ.