Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Update > determine service pack level

Reply
Thread Tools Display Modes

determine service pack level

 
 
Steve
Guest
Posts: n/a

 
      04-11-2007
save the following code between the stars,in notepad and save it with a .vbs extension is servicepack.vbs
************************************

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")

For Each objOperatingSystem in colOperatingSystems
Wscript.Echo objOperatingSystem.ServicePackMajorVersion _
& "." & objOperatingSystem.ServicePackMinorVersion
Next
*********************************

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Determine of top level driver in driver stack 东皇钟 Windows Vista Drivers 2 03-28-2007 09:07 PM
XP Service Pack 2 Background Intelligent Transfer Service 2.0 Robert Bayliss Windows Update 7 10-20-2004 06:30 PM
Re: Outlook Express 6 Service Pack 1 and Internet Explorer 6 Service Pack 1 updates Lucy [MSFT] Windows Update 0 04-30-2004 11:26 PM
--Service Pack--OE Blocks All E-mail Attachments Since Downloading Service Pack Lyssa Windows Update 1 02-12-2004 02:56 PM
818529 June 2003 Service Patch for IE6, Service Pack 1 Brian Windows Update 1 08-11-2003 07:42 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59