VSACIT
asked on
Microsoft Security Patches
Hello,
I have been task to update our remote user group with Microsoft Security patches which I down load from Microsoft's site then place on a CD. Since there is typically more than one patch each month, I need my batch file to execute uninterrupted.
Please give me advice on my batch file below.
Thanks,
VSACIT
@echo off
echo.
REM Check for folder. IF empty, show usage.
IF "%1"=="" GOTO USAGE
REM Check for folder. IF it does not exists, show error.
IF NOT EXIST "%1" GOTO ERROR
REM Processes all *.msu files in %1 folder.
:PROCESS
ECHO Please wait, processing update files in %1...
FOR %%F IN ("%1\*.msu") DO (
echo Processing: %%F...
start /wait wusa "%%F" /quiet /norestart
)
echo.
echo Done.
GOTO END
:USAGE
echo.
echo Usage:
echo.
echo.
echo *) Path contains space(s):
echo automsuupdater.cmd "X:\Long Path To My Updates"
echo.
echo *) Path does not contain space(s):
echo automsuupdater.cmd X:\Path\To\Updates
echo.
GOTO END
:ERROR
echo.
echo The folder %1 does not exist.
echo.
:END
echo.
wusa.exe Windows6.1-KB284792-x64.ms u /quiet /log /norestart
wusa.exe Windows6.1-KB2485376-x64.m su /quiet /log /norestart
wusa.exe Windows6.1-KB2585542-x64.m su /quiet /log /norestart
wusa.exe Windows6.1-KB2536276-x64.m su /quiet /log /norestart
wusa.exe Windows6.1-KB2579686-x64.m su /quiet /log /norestart
wusa.exe Windows6.1-KB2655992-x64.m su /quiet /log /norestart
wusa.exe Windows6.1-KB2685939-x64.m su /quiet /log /norestart
wusa.exe Windows6.1-KB2691442-x64.m su /quiet /log /norestart
wusa.exe Windows6.1-KB2803821-x64.m su /quiet /log /norestart
wusa.exe Windows6.1-KB2807986-x64.m su /quiet /log /norestart
wusa.exe Windows6.1-KB2845187-x64.m su /quiet /log /norestart
wusa.exe Windows6.1-KB2846071-x64.m su /quiet /log /norestart
wusa.exe Windows6.1-KB2850851-x64.m su /quiet /log /norestart
I have been task to update our remote user group with Microsoft Security patches which I down load from Microsoft's site then place on a CD. Since there is typically more than one patch each month, I need my batch file to execute uninterrupted.
Please give me advice on my batch file below.
Thanks,
VSACIT
@echo off
echo.
REM Check for folder. IF empty, show usage.
IF "%1"=="" GOTO USAGE
REM Check for folder. IF it does not exists, show error.
IF NOT EXIST "%1" GOTO ERROR
REM Processes all *.msu files in %1 folder.
:PROCESS
ECHO Please wait, processing update files in %1...
FOR %%F IN ("%1\*.msu") DO (
echo Processing: %%F...
start /wait wusa "%%F" /quiet /norestart
)
echo.
echo Done.
GOTO END
:USAGE
echo.
echo Usage:
echo.
echo.
echo *) Path contains space(s):
echo automsuupdater.cmd "X:\Long Path To My Updates"
echo.
echo *) Path does not contain space(s):
echo automsuupdater.cmd X:\Path\To\Updates
echo.
GOTO END
:ERROR
echo.
echo The folder %1 does not exist.
echo.
:END
echo.
wusa.exe Windows6.1-KB284792-x64.ms
wusa.exe Windows6.1-KB2485376-x64.m
wusa.exe Windows6.1-KB2585542-x64.m
wusa.exe Windows6.1-KB2536276-x64.m
wusa.exe Windows6.1-KB2579686-x64.m
wusa.exe Windows6.1-KB2655992-x64.m
wusa.exe Windows6.1-KB2685939-x64.m
wusa.exe Windows6.1-KB2691442-x64.m
wusa.exe Windows6.1-KB2803821-x64.m
wusa.exe Windows6.1-KB2807986-x64.m
wusa.exe Windows6.1-KB2845187-x64.m
wusa.exe Windows6.1-KB2846071-x64.m
wusa.exe Windows6.1-KB2850851-x64.m
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Not enough information to confirm an answer.