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.
Conclusion: Thanks to Ivo I found the registry settings that store the service pack version number. Because I was (incorrectly) convinced that I had installed a service pack already, and because the "CSDBuildNumber" was 2 on my system, I did some research about the info in the registry. Here are the results:
Fresh Windows Vista image without SP:
- CSDBuildNumber: 2
- CSDVersion is not present
Fresh Windows Vista image with SP1:
- CSDBuildNumber: 1616
- CSDVersion: Service Pack 1
Fresh Windows Vista image with SP2:
- CSDBuildNumber: 1621
- CSDVersion: Service Pack 2
So indeed, my problem was that - contrary to what I believed - I had no service pack installed. Thus, the "Control Panel / System" dialog can be trusted.
3 Answers
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)
4Run winver from the start menu type-in box (or anywhere else you can run arbitrary commands from).
This little util opens up a message box that lists the current Windows version and service pack level.
5My 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: