XP SP2 Version Number

  • Thread starter Thread starter ChrisB
  • Start date Start date
C

ChrisB

Do XP and XP SP2 have different version numbers that I can test for within
my program to dteremine if SP2 is installed? If not, how do I
programatically determine if XP SP2 is installed?
 
Here's a quick vbscript that does it using WMI.


set oSvc = GetObject("winmgmts:")

set Systems = oSvc.ExecQuery("Select * from Win32_OperatingSystem")

for each sys in Systems
wscript.echo "ServicePack number: " & sys.ServicePackMajorVersion
next
 
Thanks!

Philip Nunn said:
Here's a quick vbscript that does it using WMI.


set oSvc = GetObject("winmgmts:")

set Systems = oSvc.ExecQuery("Select * from Win32_OperatingSystem")

for each sys in Systems
wscript.echo "ServicePack number: " & sys.ServicePackMajorVersion
next


--
Philip Nunn [MSFT]
This posting is provided "AS IS" with no warranties, and confers no
rights. Use of included script samples are subject to the terms specified
at http://www.microsoft.com/info/cpyright.htm.
ChrisB said:
Do XP and XP SP2 have different version numbers that I can test for
within my program to dteremine if SP2 is installed? If not, how do I
programatically determine if XP SP2 is installed?
 
Back
Top