J
Jeff P
Hello all,
I am looking for a way to determine if SP4 for Windows 2000 is installed on
a remote PC, without any third party tool (except maybe REG.exe from NT4 Res
Kit). I am scanning for certain Hotfixes, but some of them are not required
if SP4 is on the PC.
E.g code:
:026
::*** Checks for the existence of the Registry value created by patch
MS03-026
REG QUERY "HKLM\SOFTWARE\Microsoft\Updates\Windows 2000\SP5\KB823980"
\\%SNAME%
IF ERRORLEVEL 161 GOTO :REGERROR
IF ERRORLEVEL 53 GOTO :NetError
IF ERRORLEVEL 5 GOTO :NetAccess
IF ERRORLEVEL 2 GOTO :No026
IF ERRORLEVEL 1 GOTO :error
IF ERRORLEVEL 0 GOTO :Yes026
GOTO :Error
:No026
ECHO. >> Results.log
ECHO %SNAME% is mising MS03-026 patch !!!!!!!!!!!!!!!!! >> Results.log
ECHO. >> Results.log
GOTO :SP4
:Yes026
ECHO. >> Results.log
ECHO %SNAME% has MS03-026 patch installed. >> Results.log
ECHO. >> Results.log
GOTO :SP4
:SP4
::*** Here is my problem area, not sure if this is how I should do it and if
it is how to make it work...
REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CSDVersion"
\\%SNAME% >> SP.txt
IF SP4 is installed goto :End Otherwise check for another hotfix.
The SP.txt file has the following info:
Connecting to remote machine \\namf233111
REG_SZ CSDVersion Service Pack 3
Not sure if I can use that somehow for what i want to do or not?
Thanks!
I am looking for a way to determine if SP4 for Windows 2000 is installed on
a remote PC, without any third party tool (except maybe REG.exe from NT4 Res
Kit). I am scanning for certain Hotfixes, but some of them are not required
if SP4 is on the PC.
E.g code:
:026
::*** Checks for the existence of the Registry value created by patch
MS03-026
REG QUERY "HKLM\SOFTWARE\Microsoft\Updates\Windows 2000\SP5\KB823980"
\\%SNAME%
IF ERRORLEVEL 161 GOTO :REGERROR
IF ERRORLEVEL 53 GOTO :NetError
IF ERRORLEVEL 5 GOTO :NetAccess
IF ERRORLEVEL 2 GOTO :No026
IF ERRORLEVEL 1 GOTO :error
IF ERRORLEVEL 0 GOTO :Yes026
GOTO :Error
:No026
ECHO. >> Results.log
ECHO %SNAME% is mising MS03-026 patch !!!!!!!!!!!!!!!!! >> Results.log
ECHO. >> Results.log
GOTO :SP4
:Yes026
ECHO. >> Results.log
ECHO %SNAME% has MS03-026 patch installed. >> Results.log
ECHO. >> Results.log
GOTO :SP4
:SP4
::*** Here is my problem area, not sure if this is how I should do it and if
it is how to make it work...
REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CSDVersion"
\\%SNAME% >> SP.txt
IF SP4 is installed goto :End Otherwise check for another hotfix.
The SP.txt file has the following info:
Connecting to remote machine \\namf233111
REG_SZ CSDVersion Service Pack 3
Not sure if I can use that somehow for what i want to do or not?
Thanks!