Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Batch File For Installing Offline Windows Updates .MSU and .EXE Files
New Posts  All Forums:Forum Nav:

Batch File For Installing Offline Windows Updates .MSU and .EXE Files

post #1 of 2
Thread Starter 
I've been banging my head against a wall trying to figure this out.

I need to create a batch file that installs windows updates that I've download for offline install. All of the files will be inside a folder with the batch file. The updates need to automatically install when starting the batch file and then the user will hit any key to restart.

Is there a way to have the batch file install the .msu files with the WUSA program like I do currently and then also install the exe files in a separate command in the same batch file?

@ECHO OFF
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
FOR /R "%~dp0" %%A IN (*.msu*) DO (
CALL :SUB %%~nA
ECHO= Installing KB!KB_NUM!
>NUL TIMEOUT /t 3
WUSA "%%A" /quiet /norestart)
ECHO= == Press any key to restart ==
>NUL PAUSE
SHUTDOWN.EXE /r /t 0
GOTO :EOF

This code I found online seems to work with the .msu files decently but I can't figure out how to force it to install .exe updates also. I'm guessing rewriting it from scratch might be easier but I'm pretty new to this.

Thanks for any help!
post #2 of 2
hi I write through a translator sorry if n solucinar could understand me your problem to install updates offline .... to me the same ... let me know and I'll pass what I've done ... greetings from Argentina
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Batch File For Installing Offline Windows Updates .MSU and .EXE Files