2

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.

sysadmin1138
  • 131,083
  • 18
  • 173
  • 296
QuietLeni
  • 31
  • 1
  • 5
  • 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 02: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

3 Answers3

2

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.

Zypher
  • 36,995
  • 5
  • 52
  • 95
  • 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: http://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 - http://msdn.microsoft.com/en-us/library/aa394239(VS.85).aspx – Zypher May 24 '11 at 14:35
0

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

KCotreau
  • 3,361
  • 3
  • 19
  • 24
0

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?

QuietLeni
  • 31
  • 1
  • 5