Jump to content

Recommended Posts

Posted

Current:

 

@echo off
REM script to install windows 7 hotfixes.
cls
echo installing KB2492806-x64 ...
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2492806-x64.msu /quiet /norestart
echo installing KB2505438-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2505438-x64.msu /quiet /norestart
echo installing KB2505454-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2505454-x64.msu /quiet /norestart
echo installing KB2510636-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2510636-x64.msu /quiet /norestart
echo installing KB2523887-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2523887-x64.msu /quiet /norestart
echo installing KB2524478-v2-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2524478-v2-x64.msu /quiet /norestart
echo installing KB2525332-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2525332-x64.msu /quiet /norestart
echo installing KB2547244-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2547244-x64.msu /quiet /norestart
echo installing KB2555428-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2555428-x64.msu /quiet /norestart
echo installing KB2561285-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2561285-x64.msu /quiet /norestart
echo installing KB2561708-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2561708-x64.msu /quiet /norestart
echo installing KB2578159-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2578159-x64.msu /quiet /norestart
echo installing KB2580119-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2580119-x64.msu /quiet /norestart
echo installing KB2581608-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2581608-x64.msu /quiet /norestart
echo installing KB2582112-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2582112-x64.msu /quiet /norestart
echo installing KB2610379-v2
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2610379-v2-x64.msu /quiet /norestart
echo installing KB2617858-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2617858-x64.msu /quiet /norestart
echo installing KB2625434-x6
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2625434-x64.msu /quiet /norestart
echo installing KB2640148-v2-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2640148-v2-x64.msu /quiet /norestart
echo installing KB2645611-v2-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2645611-v2-x64.msu /quiet /norestart
echo installing KB2655998-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2655998-x64.msu /quiet /norestart
echo installing KB2661001-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2661001-x64.msu /quiet /norestart
echo installing Windows6.1-KB2673042-v2-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2673042-v2-x64.msu /quiet /norestart
echo installing Windows6.1-KB2675785-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2675785-x64.msu /quiet /norestart
echo installing KB2685893-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2685893-x64.msu /quiet /norestart
echo installing KB2689311-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2689311-x64.msu /quiet /norestart
echo installing KB2693010-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2693010-x64.msu /quiet /norestart
echo installing KB2698279-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2698279-x64.msu /quiet /norestart
echo installing KB2703610-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2703610-x64.msu /quiet /norestart
echo installing KB2715922-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2715922-x64.msu /quiet /norestart
echo installing KB2725279-v2-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2725279-v2-x64.msu /quiet /norestart
echo installing KB2727324-v2-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2727324-v2-x64.msu /quiet /norestart
echo installing KB2728738-v2-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2728738-v2-x64.msu /quiet /norestart
echo installing KB2751389-x64
Wusa.exe \scripts\MSI\Hotfix_x64\Windows6.1-KB2751389-x64.msu /quiet /norestart
pause

 

Ideally this would look like:

 

For each .msu in the folder.
Echo installing 
wusa.exe  /quiet /norestart
Repeat

 

Can anyone help with turning my psudocode into reality please? :)

Posted

This should do it...

 

@echo off
cd /d "%~dp0"

for /f "skip=1" %%A in ('dir /b *.msu') do (
echo Installing Update "%%A" ...
start "" /wait WUSA %%A /quiet /norestart > nul
)

echo.
echo Updates are installed. Press any key to reboot.
pause >NUL
shutdown -r -t 0

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...