Link to home
Start Free TrialLog in
Avatar of jcallwood
jcallwood

asked on

I need help writing a login script to patch for the recent MS JScript Vulnerability

I need help writing a login script to patch for the recent MS JScript Vulnerability.  98/Me/NT4 machines run sample1.exe.  2000/XP runs sample2.exe.  So basically I need a batch that would identify the OS and apply the correct patch pertaining to the OS.  Since the patch requires a reboot is there any way to tell the batch that if the patch has been already been installed from a previous login do not run the rest of the batch.

Thanks any help would be greatly appreciated
Jay
ASKER CERTIFIED SOLUTION
Avatar of ryangorman
ryangorman

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Bartender_1
Here's a batch file for determining what OS is on the system. Feel free to edit it and use it for your needs.

Batch file starts:

@ECHO OFF
VER|FIND "XP">NUL
IF NOT ERRORLEVEL 1 GOTO WinXP
VER|FIND "2000">NUL
IF NOT ERRORLEVEL 1 GOTO Win2K
VER|FIND "NT">NUL
IF NOT ERRORLEVEL 1 GOTO WinNT
VER|FIND "Mil">NUL
IF NOT ERRORLEVEL 1 GOTO WinME
VER|FIND "98">NUL
IF NOT ERRORLEVEL 1 GOTO Win98
VER|FIND "95">NUL
IF NOT ERRORLEVEL 1 GOTO Win95
GOTO BADOS

:WinXP
ECHO WinXP
GOTO END

:Win2K
ECHO Win2K
GOTO END

:WinNT
ECHO WinNT
GOTO END

:WinME
ECHO WinME
GOTO END

:Win98
ECHO Win98
GOTO END

:Win95
ECHO Win95
GOTO END

:BADOS
ECHO This OS is not supported
GOTO END

:END

Batch file ends

This combined with the recommendation by ryangorman will do what you desire.

Hope this helps!

:o)

Bartender_1