Skip to content

Instantly share code, notes, and snippets.

@ForestJay
Created November 19, 2014 16:18
Show Gist options
  • Save ForestJay/9632fa8d09678a3ef01f to your computer and use it in GitHub Desktop.
Save ForestJay/9632fa8d09678a3ef01f to your computer and use it in GitHub Desktop.
WinShock Patch
# After.bat
# Contains a list of computers updated
@echo off
for /F "tokens=*" %%A in (AfterReboot.txt) do (
echo Processing %%A....
psexec \\%%A cmd /c "start /wait c:\temp\after.bat"
)
echo Completed
pause
# Before.bat
# BeforeList.txt contains a list of computers to update
@echo off
for /F "tokens=*" %%A in (BeforeList.txt) do (
echo Processing %%A....
psexec \\%%A cmd /c "start /wait c:\temp\before.bat"
psexec \\%%A cmd /c "start /wait c:\temp\WindowsServer2003-KB2992611-x64-ENU.exe /forceappsclose /forcerestart /passive /quiet /warnrestart:1"
)
echo Completed
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment