XP SP2 Version Number

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?
 
P

Philip Nunn [MSFT]

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
 
C

ChrisB

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top