Home » Questions » Computers [ Ask a new question ]

Where to find Vista's service pack level?

Where to find Vista's service pack level?

When Vista's service pack version is at level 1 (SP1), this version number is shown at "Control Panel / System". However, on my system this information has disappeared, probably because I'm now using SP2. I'd like to verify this, so I can be certain.

Asked by: Guest | Views: 108
Total answers/comments: 2
Guest [Entry]

"Have a look at this registry entry:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CSDBuildNumber

Check this article on what it's for (thanks for the comments)"
Guest [Entry]

"My answer (the right answer), for posterity:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Windows\CSDVersion (a REG_DWORD)

The Service Pack level (if any) value is obtained by doing CSDVersion >> 8 i.e. right-shifting the CSDVersion REG_DWORD by 8 bits; e.g. the REG_DWORD value will be 0x100 for SP1, 0x200 for SP2, and so on.

This works for Windows versions all the way back to NT4, and is Microsoft's preferred way of obtaining SP level before the introduction of the OSVERSIONINFOEX structure, as outlined in the Windows Fundamental Requirements [1], specifically requirement ""7. Perform Windows Version-Checking Correctly"" (see reference link below for more details)

[1] Reference: http://msdn.microsoft.com/en-us/library/ms954375.aspx"