I need to be able to read the registry and find the Edition of Windows 2003. I can find the edition of Windows 2008 and Windows 2008 R2 by looking into:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\@ProductName

and I see something like:

"Microsoft Windows Server 2008 R2 Standard" or "Microsoft Windows Server 2008 R2 Enterprise"

However, when I look at this value in Windows 2003, I only see:

"Microsoft Windows Server 2003 R2" with no Edition (e.g. Standard or Enterprise) information.

I have looked everywhere in the registry for something to help me to find the edition information, but I cannot find it. I can see it in System Information, but nowhere in the registry?!

I need this information, as I need to work out which one I am working with for an inventory.

link|improve this question
Are you creating a program to do this? It can be determined programatically if that's an option. – Ben Pilbrow May 20 '11 at 17:10
It can be determined from a combination of other values but is not stored in the registry in human readable form. – John Gardeniers May 21 '11 at 2:15
I am using an inventory system that can look into the registry and read anything it wants. That is how I am getting the Windows 2008/XP/2008 R2 information. Windows 2003 is the exception. I donj't care if it is human-readable, I just need to detect the value and my system will then understand that and turn it into human-readable... So, wher is it? – QuietLeni May 23 '11 at 11:00
feedback

3 Answers

A more portable and probably reliable option would be to check these values via WMI - you'd be interested in the Win32_OperatingSystem class.

Technet has a brief primer with vbscript code on this class.

link|improve this answer
I am doing it programmatically, but I cannot use WMI. :-( I just need to know the registry value and if it is set, then it responds back with a yes or a no. – QuietLeni May 23 '11 at 11:28
This does not work on Windows 2003, either, according to the page: msdn.microsoft.com/en-us/library/aa394102(v=vs.85).aspx – QuietLeni May 23 '11 at 11:48
@QuietLeni sure it does, that link is Win32_ComputerSystem NOT Win32_OperatingSystem - msdn.microsoft.com/en-us/library/aa394239(VS.85).aspx – Zypher May 24 '11 at 14:35
feedback

I don't know if you have to do it via the registry, but the command "winver" in the run box returns that information.

link|improve this answer
feedback

It is a real hack, but I think that I have found the ANSWER!

If you go to HKLM\Software\Microsoft\Windows NT\CurrentVersion\@ProductId, the first 5 numbers before the dash are the edition number. I can identify it from there.

Can anyone confirm or denie this?

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.