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

OS "Flavor" detection


2 replies to this topic

JoeyB

JoeyB
  • Members
  • 2 posts

Posted 24 August 2004 - 17:18

I am using the SYSINFO structure to determine whether or not a particular flavor of 2000/2003 is the OS (E.g. 2003 Datacenter edition). I also need to determine if (for 2003) the OS is the Web Server Edition or not. Does anyone know of a way to do this? I can't seem to find anything about this anywhere, but then again I may not be searching for the right stuff...

Thanks,
Joey

RedgeDunlop

RedgeDunlop
  • Members
  • 2 posts

Posted 26 August 2004 - 16:28

Go into the help file, and type "SYSINFO" under the index tab. There you will find the following:

SYSINFO.nSuites - A combination of one or more bit flags that indicate the suite(s) on the target machine. Possible bit flags are the following:

ISOS_ST_ALL
ISOS_ST_XP_PRO
ISOS_ST_XP_HOME
ISOS_ST_SERVER
ISOS_ST_WORKSTATION
ISOS_ST_BACKOFFICE
ISOS_ST_DATACENTER
ISOS_ST_ENTERPRISE
ISOS_ST_SMALLBUSINESS
ISOS_ST_SMALLBUSINESS_RESTRICTED
ISOS_ST_TERMINAL
0 (zero) - indicates that no suite is detected on the target machine

To check whether a bit flag is set, use the bitwise AND (&) operation as in the following example:


if (SYSINFO.nSuites & ISOS_ST_XP_PRO) then
/* Perform operations that are
specific to Windows XP Home Edition. */
endif;


Hope this helps ;-)

JoeyB

JoeyB
  • Members
  • 2 posts

Posted 27 August 2004 - 15:20

Thanks for the reply!

However, I need to know specifically how to look for the Web Server edition of 2003 Server, and I do not see anything in the SYSINFO structure that specifically relates to this edition. I am already using SYSINFO to detect datacenter editions of 2000/2003, but with 2003 our products are not supported on the web server edition.

Any ideas? I was thinking that there has to be a registry key that I could read in or something (or even just see if it exists) to determine whether or not it is the Web Server Edition of 2003.

Thanks,
Joey