This is one I've used for almost two years.
Use the program REG.exe
(standard in XP, but also works in 2000)
Download REG.exe
or copy it from the Windows 2000 Resource Kit
to your WINNT\SYSTEM32 folder.
Before running the script,
build a list of your computer names in a file
named computerlist.txt.
I type
NET VIEW > computerlist.txt
Remove the top and bottom lines from the file
so that only the computer names are listed.
Do not remove the two back-slashes \\ from the front.
The file should look like this:
\\computer1
\\computer2
\\computer3
You may need to place at least one space
after each computer name.
Mine comes out that way automatically.
You may also need to tweak the BAT file for your situation.
Such as change the Delimiter settings.
The script will appear broken into may lines on screen.
It should only be 6 lines total.
Each line starts with FOR and ends with .LOG
:::::::: START OF BATCH SCRIPT 1 ::::::::
FOR /F "TOKENS=1 DELIMS= " %%A IN ('TYPE computerlist.txt') DO REG QUERY "%%A\HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /V CSDVersion | FIND/I "Service Pack 1" && ECHO %%A >> SP1.LOG
FOR /F "TOKENS=1 DELIMS= " %%A IN ('TYPE computerlist.txt') DO REG QUERY "%%A\HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /V CSDVersion | FIND/I "Service Pack 2" && ECHO %%A >> SP2.LOG
FOR /F "TOKENS=1 DELIMS= " %%A IN ('TYPE computerlist.txt') DO REG QUERY "%%A\HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /V CSDVersion | FIND/I "Service Pack 3" && ECHO %%A >> SP3.LOG
FOR /F "TOKENS=1 DELIMS= " %%A IN ('TYPE computerlist.txt') DO REG QUERY "%%A\HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /V CSDVersion | FIND/I "Service Pack 4" && ECHO %%A >> SP4.LOG
FOR /F "TOKENS=1 DELIMS= " %%A IN ('TYPE computerlist.txt') DO REG QUERY "%%A\HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /V CSDVersion | FIND/I "Service Pack 5" && ECHO %%A >> SP5.LOG
FOR /F "TOKENS=1 DELIMS= " %%A IN ('TYPE computerlist.txt') DO REG QUERY "%%A\HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /V CSDVersion | FIND/I "Service Pack 6" && ECHO %%A >> SP6.LOG
:::::::: END OF BATCH SCRIPT 1 ::::::::
The computer name output will be placed in files called:
SP1.LOG
SP2.LOG
SP3.LOG
SP4.LOG
SP5.LOG
SP6.LOG
If a computer has Service Pack 1 installed, you will see
\\somecomputername
listed in file SP1.LOG
If a computer has Service Pack 2 installed, you will see
\\somecomputername
listed in file SP2.LOG
Austin M. Horst