Discussion Locked

Using script to find service pack number

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi everyone
Does anyone know of a method to find the currently installed service pack on a given PC from a remote machine?

What I am after is a method which would allow me to automate collecting this information via use of a command script.

Thanks in advance

Daryl Sheppard
daryl_s@bigpond.com

6 replies

by beermonster

Hi,
In your case I'd use regfind from the reskit (I'm currently on the win2k reskit, but I seem to recall it was in the NT reskit too). I've had to do something similar myself, you need to compile a list of the workstations (from user manager ifyou have a domain) and make a for loop in your batch file to call regfind for each pc. depending on your on an NT \ win2k \ xp machine you'll need to query hklm\software\microsoft\windowsnt\currentversion

pipe the output to find. It's possible toget create a script that will query several machines at once if you have lots to do, but easier to just have one script that you can leave running overnight. let me know if you need any help with this. Hope it goes ok....

by griz1975

I use KixTart for my login script stuff, and I have a key set to read the registry to find out the OS and Service Patch level. Here is a part of my script for the WinNT Family (W2K, WinXP, WinNT 4.0) to find out what Service Pack the system is...
$Svcpack=ReadValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion","CSDVersion")

If you don't use KixTart, find another script that will allow you to read the registry, and use that Registry Key...thats where the registry notesthe service pack.

This discussion is closed to new replies.