I've found the @DOS and @PRODUCTTYPE macros within KiXtart to get the OS information, but I can't find a reference that will tell me the possible values and how they relate to the operating system version. For example on my Windows 7 installation @DOS returns 6.1
I've also seen VBScript code that gets information from winmgmts: Win32_Operatingsystem Caption
If I'm trying to write and enterprise script that is going to do its best anticipate the returning values what is the most reliable way to get the operating system version.
My current problem is that I am trying to read the logon provider from the registry and the location is different when you use Windows 7.
For Windows 7 I use:
Temp = ReadReg("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\LastLoggedOnProvider")
LogonProvider = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\" & Temp & "\"
Temp = ReadReg(LogonProvider)
For other Windows I use:
Temp = ReadReg("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultUserName")