Connecting Tech Pros Worldwide Help | Site Map

Registry entry to determine OS Version

Member
 
Join Date: Jul 2007
Posts: 55
#1: Oct 28 '08
I want to know if there is a registry entry that will tell me if a computer is using XP Pro or XP Home? The same with vista.

I am familiar with HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion but it doesn't say the specific version.

Thanks
Banfa's Avatar
AdministratorVoR
 
Join Date: Feb 2006
Location: South West UK
Posts: 6,158
#2: Oct 29 '08

re: Registry entry to determine OS Version


Why are you looking for a way to get this information from the registry?

I do not think it is in there, logically it would not be it is not a piece of configuration information it is an intrinsic attribute of the compiled software.

If you are writing a program and need to get the windows version then call the function GetVersionEx (look it up on MSDN).

In another situation see if you can parse the output of the command
ver
Newbie
 
Join Date: Oct 2008
Posts: 5
#3: Oct 29 '08

re: Registry entry to determine OS Version


i think command "ver" would be the best solution to know which version of windows you are using
Member
 
Join Date: Jul 2007
Posts: 55
#4: Oct 29 '08

re: Registry entry to determine OS Version


Quote:

Originally Posted by Banfa

Why are you looking for a way to get this information from the registry?

I do not think it is in there, logically it would not be it is not a piece of configuration information it is an intrinsic attribute of the compiled software.

If you are writing a program and need to get the windows version then call the function GetVersionEx (look it up on MSDN).

In another situation see if you can parse the output of the command

ver

Thanks for your reply.

I've gone the GetVersionEx route, but I did not see XP Home or XP Pro in any of the values. So are you saying that it is not possible to find this? I just need to know one way or the other. I have a VB6 program that needs to turn on or off a flag based on if they are using home or pro.
Member
 
Join Date: Jul 2007
Posts: 55
#5: Oct 29 '08

re: Registry entry to determine OS Version


Quote:

Originally Posted by Matt Nunnally

Thanks for your reply.

I've gone the GetVersionEx route, but I did not see XP Home or XP Pro in any of the values. So are you saying that it is not possible to find this? I just need to know one way or the other. I have a VB6 program that needs to turn on or off a flag based on if they are using home or pro.

Nevermind....I found this article that had exactly what I was looking for:

http://vbnet.mvps.org/index.html?code/helpers/iswinversion.htm
Banfa's Avatar
AdministratorVoR
 
Join Date: Feb 2006
Location: South West UK
Posts: 6,158
#6: Oct 29 '08

re: Registry entry to determine OS Version


The wSuiteMask member of the OSVERSIONINFOEX structure returned by GetVersionEx will have the bit VER_SUITE_PERSONAL set for XP home Edition.

Read the full description of OSVERSIONINFOEX on MSDN
ambrnewlearner's Avatar
Expert
 
Join Date: Jan 2008
Location: A city in my country ;)
Posts: 855
#7: Oct 29 '08

re: Registry entry to determine OS Version


Hello,

Quote:

Originally Posted by Matt Nunnally

I've gone the GetVersionEx route, but I did not see XP Home or XP Pro in any of the values. So are you saying that it is not possible to find this?

Hello,

I think that you got the solution but still I am posting this....
For the registry key...........
Expand|Select|Wrap|Line Numbers
  1. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
.....you can get only following Versions:
Microsoft Windows 2000 (not Pro and Server)
Microsoft Windows XP (NotHome and Pro)
Microsoft Windows Server 2003

Quote:

Originally Posted by Matt Nunnally

So are you saying that it is not possible to find this?

Nope. There must be some registry entry which must contain this information. And so, if you want I will search google for you (but I dont think that you need this anymore :)

Hope this helps..........
AmbrNewlearner
Reply


Similar Microsoft Windows / Vista / XP / ME / 95 & 98 bytes