RSS Feed Subscribe to the RSS feed Last updated:  24 Dec 2010

Determine Service Pack Level from Registry

Finding OS
32 or 64 Bit


From:

http://www.windowsnetworking.com/kbase/WindowsTips/WindowsNT/RegistryTips/Miscellaneous/Determineservicepacklevel.html

WORKS FOR XP, VISTA, and probably WIN7


To determine the current Windows NT Service Pack level installed, you can query the registry, useful for script automation, using the following Windows NT Registry hack: 
Hive: HKEY_LOCAL_MACHINE
Key: system\CurrentControlSet\control\windows
Name: CSDVersion 
Type: REG_DWORD
Value: 0x100 = SP1 
Value: 0x200 = SP2
Value: 0x300 = SP3
Value: 0x400 = SP4
Value: 0x500 = SP5
Value: 0x600 = SP6


This value does not distinguish SP6 from SP6a. If SP6a has been installed, HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT\CurrentVersion\Hotfix\Q246009\Installed will have a value of 1.


Finding OS:
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT\CurrentVersion
\CurrentVersion
XP = 5.1; Vista = 6.0; Win7 = 6.1

32 or 64 bit:
OS Platform:  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE
Chip capability:  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_IDENTIFIER