Registry entry to determine OS Version

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Matt Nunnally
    New Member
    • Jul 2007
    • 56

    Registry entry to determine OS Version

    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_MACH INE\SOFTWARE\Mi crosoft\Windows NT\CurrentVersi on but it doesn't say the specific version.

    Thanks
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    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

    Comment

    • spycon
      New Member
      • Oct 2008
      • 4

      #3
      i think command "ver" would be the best solution to know which version of windows you are using

      Comment

      • Matt Nunnally
        New Member
        • Jul 2007
        • 56

        #4
        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.

        Comment

        • Matt Nunnally
          New Member
          • Jul 2007
          • 56

          #5
          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.ht m

          Comment

          • Banfa
            Recognized Expert Expert
            • Feb 2006
            • 9067

            #6
            The wSuiteMask member of the OSVERSIONINFOEX structure returned by GetVersionEx will have the bit VER_SUITE_PERSO NAL set for XP home Edition.

            Read the full description of OSVERSIONINFOEX on MSDN

            Comment

            • AmberJain
              Recognized Expert Contributor
              • Jan 2008
              • 922

              #7
              Hello,

              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...........
              Code:
              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

              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

              Comment

              Working...