PDA

View Full Version : Windows Operation System Version, Service Pack, Roles



HeikoOtt
03-03-2006, 11:06 AM
Hi,

this might be a simple question - I tought so - but I have some problems with it:

What is the easiest way to find out:
- which Windows OS (2000, XP, 2003)
- which ServicePack (SP 1, ...)
- which role my system (Server, Advanced Server, Standard, Enterprise, )

I thought to catch those information from registry by using a Windows GetRegistryValue Action for the HKLM\Software\Microsoft\Windows NT\CurrentVersion hive with the keys CurrentVersion, CSDVersion and ProductName, however the information about the role is not consistently available.

There must be another registry key where I can derive those information or is it provided by IS MP itself???

Please give me a hint, I don't want to do a JNI call ;-)

Thanks in advance!
Heiko

RobertDickau
03-03-2006, 02:20 PM
You might look at KB article Q104982, "Determining If the Target Machine Is Server or Workstation", at http://support.installshield.com for information about a registry key with which you can distinguish the product options...

HeikoOtt
03-03-2006, 03:50 PM
Robert,
thanks for your fast Feedback.

Maybe this is enough, but I fear it's not. I know how to do it by calling Win API. Are JNI calls in IS critical?

Regards,
Heiko

RobertDickau
03-03-2006, 04:00 PM
If you want an overview of the whole process, here's an example from the DevLetter archives: Using JNI to Retrieve a Win32 File Version (http://www.installshield.com/news/newsletter/0203-articles/mp-tip.asp)...

HeikoOtt
03-07-2006, 07:08 AM
Robert,

sorry for the latency on this - your hint is excellent. Thanks a lot!
...JNI is no big deal and your example contains all I needed.

To retrieve the desired information, I used this MSDN articel as guideline:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/getting_the_system_version.asp)

Heiko