Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Detecting Win2K SP2

28 views
Skip to first unread message

Todd

unread,
May 28, 2002, 12:43:28 PM5/28/02
to
I need to run an update based on if a machine has SP2
installed. What is the best file to use as a "check" to
initiate the update via a batch script?

Regards,
Todd

Jerold Schulman

unread,
May 28, 2002, 2:43:52 PM5/28/02
to

Use REG from the support tools, tip 3968 in the 'NT Reg Hacks' at
http://www.jsiinc.com.


C:\>for /f "Skip=3 Tokens=2*" %%i in ('REG QUERY "HKLM\Software\Microsoft
\Windows NT\CurrentVersion" /v CSDVersion') do set SP="%%j"
if %SP%="Service Pack 2" goto SP2


Jerold Schulman
Windows Server MVP / Configuration Management
JSI, Inc.
http://www.jsiinc.com

0 new messages