http://support.microsoft.com/kb/158238 lists the OS's for Windows ME through Windows 95.
it comes from the key
HKEY_LOCAL_MACH INE\SOFTWARE\Mi crosoft\Windows \CurrentVersion[VersionNumber]
and you don't bother with the appended A's and B's because that is in a different entry.
Microsoft doesn't have such a list for newer OS's, unfortunately.
HKEY_LOCAL_MACH INE\SOFTWARE\Mi crosoft\Windows NT\CurrentVersi on[CurrentVersion]
seems to contain the version number for windows NT-family OS's, such as NT, XP, 2000, Vista, 2008 and 7 I think.
question is, for those OS's, what is the value of CurrentVersion?
for XP it's "5.1"
for 2003 it's "5.2"
for 2000 it's "5.0"
for NT 4.0 it's "4.0" I think
for NT 3.1, 3.5, 3.51, I don't know.
for Vista? 6.0?
for 2008? 6.1?
for 7? 7.0?
somebody help me out here. I am trying to write installers and code, and the detection is important.
It would be a whole lot simpler to use ProductName in the same key because it has name strings, but I am not sure if it is available on all boxen in "Windows NT" key on the NT family boxen and the "Windows" key on the 95-me boxen.
someone please verify. I can verify on 98SE and XP.
it comes from the key
HKEY_LOCAL_MACH INE\SOFTWARE\Mi crosoft\Windows \CurrentVersion[VersionNumber]
and you don't bother with the appended A's and B's because that is in a different entry.
Microsoft doesn't have such a list for newer OS's, unfortunately.
HKEY_LOCAL_MACH INE\SOFTWARE\Mi crosoft\Windows NT\CurrentVersi on[CurrentVersion]
seems to contain the version number for windows NT-family OS's, such as NT, XP, 2000, Vista, 2008 and 7 I think.
question is, for those OS's, what is the value of CurrentVersion?
for XP it's "5.1"
for 2003 it's "5.2"
for 2000 it's "5.0"
for NT 4.0 it's "4.0" I think
for NT 3.1, 3.5, 3.51, I don't know.
for Vista? 6.0?
for 2008? 6.1?
for 7? 7.0?
somebody help me out here. I am trying to write installers and code, and the detection is important.
It would be a whole lot simpler to use ProductName in the same key because it has name strings, but I am not sure if it is available on all boxen in "Windows NT" key on the NT family boxen and the "Windows" key on the 95-me boxen.
someone please verify. I can verify on 98SE and XP.
Comment