Value or registry key to identify SP2 installation?

  • Thread starter Thread starter Jeff Karasik
  • Start date Start date
J

Jeff Karasik

Using a variable in a logon script, is there a value or a registry key that
I can query which will tell me whether an XP computer has SP2 installed?
 
I do not have SP2 so I can't narrow it down any more than...

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows XP\SP2 or SP3

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
Put the following inside a text file and call it whatever.vbs:

-----------------------------------------
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer &
"\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from
Win32_OperatingSystem",,48)
For Each objItem in colItems
Wscript.Echo objItem.ServicePackMajorVersion
Next
 
Back
Top