Find EXACT Windows Version for 32-bit Windows!
Keywords: winversion
In addition to the code below that reads the registry and gets exact version information,
you can also read from the little-known MS-supplied %windir%\system32\prodspec.ini file.
This is on all version of NT and Win2000, and unlike winver, it can tell you exactly
what sub-version of an OS you're running. Like Windows 2000 Advanced Server vs.
Windows 2000 Professional.
[Product Specification]
Product=Windows 2000 Professional
Test Registry: Find EXACT Windows Version for 32-bit Windows!
ver=""
CheckReg=regexistVALUE(@REGMACHINE,"Software\Microsoft\Windows\CurrentVersion[Version]")
if CheckReg==0 then
checkNT=regexistVALUE(@regmachine, "software\microsoft\windows nt\currentversion[CurrentVersion]")
if checkNT==0 then
message("Notice:", "Windows Version not detected!!!")
exit
else
NTVersion=regqueryvalue(@regmachine, "software\microsoft\windows nt\currentversion[CurrentVersion]")
if NTVersion=="5.1" then ver="XP Pro"
if NTVersion=="5.0" then ver="Win2K"
if NTVersion=="4.0" then ver="WinNT"
end if
else
WindowsVersion=RegQueryValue(@REGMACHINE,"Software\Microsoft\Windows\CurrentVersion[Version]")
if WindowsVersion=="Windows 95" then
SubVersionNumber=RegQueryValue(@REGMACHINE,"Software\Microsoft\Windows\CurrentVersion[SubVersionNumber]")
if SubVersionNumber == "" then
ver="Win950"
message("Netware Client Upgrade", "%@CRLF%Service Pack 1 for Win95 needs installed,%@CRLF%please contact I.S. immediately.%@CRLF%")
exit
END IF
if SubVersionNumber == "A" then ver="Win95A"
if SubVersionNumber == "B" then ver="Win95B"
if SubVersionNumber == "C" then ver="Win95C"
END IF
If WindowsVersion=="Windows 98" then
VersionNumber=RegQueryValue(@REGMACHINE,"Software\Microsoft\Windows\CurrentVersion[VersionNumber]")
if VersionNumber == "4.10.1998" then ver="Win98"
if VersionNumber == "4.10.2222" then ver="Win98SE"
END IF
If WindowsVersion == "Windows Millennium Edition" then ver="WinME"
end if
if ver=="" then
message("Notice:", "%@CRLF%Unable to Determine OS!!!!!!%@CRLF%")
exit
end if
MESSAGE("WINDOWS VERSION:", "%@CRLF%You are running:%@CRLF%%VER%%@CRLF%")
Article ID: W14567
Filename: Get Exact WIndows Version.txt