David wrote:
> Hi everyone,
> Does anyone here have a way to determine the installed
> service pack level of windows 2000 from within a batch
> file? I would really appreciate any help.
Hi
Several ways:
A)
Use reg.exe (you can run reg.exe from e.g. a network drive), take a look here
for an example on how to use it in a batch file to test for SP level:
http://groups.google.com/groups?selm...l4ch%404ax.com
Reg.exe is in the Win2k Support Tools found on the Win2k CD,
\Support\Tools\Suptools.msi, or for the latest version of
Support Tools (should work on non-SP4 computers as well):
http://www.microsoft.com/windows2000...pporttools.asp
In WinXP, Reg.exe comes default installed with the OS.
B)
osver.exe in Windows Admin Script Tools
http://home.comcast.net/~stewartb/wast.html
osver.exe -s
This returns the service pack level as an ERRORLEVEL for use in scripts if
needed.
--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide:
http://www.microsoft.com/technet/scriptcenter