Jump to content



Photo

Auto installing multiple hotfixes updates?


  • This topic is locked This topic is locked
5 replies to this topic

#1 Tantawi

Tantawi

    Neowinian Senior

  • Joined: 02-March 04
  • Location: Switzerland
  • OS: Windows 8.1 64-bit
  • Phone: Sony Xperia Z

Posted 09 May 2007 - 13:57

Hi,

I'm looking for a .bat file or a program to let me input a list of Windows Vista update files "Windows6.0-KBxxxxxx-x86.msu", and then it installs them automatically without any user interaction. (auto accepts prompts etc, pretty much like updating Windows via Autopatcher).

I'm asking because I've been downloading and installing all patches from http://thehotfixshar...amp;sort_mode=d (hotfixes issued by MS and not on Windows Update). And currently I have like 120 files and I can imagine the pain if I needed to reinstall Windows for some reason later!

I know all of those patches will be included in Vista SP1, but I tried searching for an automated solution for now and couldn't find it, also Autopatcher isn't a solution since it includes only public fixes available on Windows Update.

Thanks. :)


#2 Wilhelmus

Wilhelmus

    Neowinian

  • Joined: 19-February 05
  • Location: Finland

Posted 09 May 2007 - 14:52

There is program included with Vista, called Windows Update Stand-alone Installer (Wusa.exe).

So, you can use following command in batch:
wusa X:\Path\Windows6.0-KBxxxxxx-x86.msu /quiet /norestart.

Description of the Windows Update Stand-alone Installer (Wusa.exe) and of .msu files in Windows Vista.

#3 OP Tantawi

Tantawi

    Neowinian Senior

  • Joined: 02-March 04
  • Location: Switzerland
  • OS: Windows 8.1 64-bit
  • Phone: Sony Xperia Z

Posted 09 May 2007 - 15:03

Thanks you, that was exactly what I want.

Now I'll try to find a way to put those commands in a single .bat file, and have it wait each line to finish before executing the next, any ideas?

Thanks again Wilhelmus!

#4 Wilhelmus

Wilhelmus

    Neowinian

  • Joined: 19-February 05
  • Location: Finland

Posted 09 May 2007 - 15:34

This should work, but no guarantees... :)

Save following as "automsuupdater.cmd".

Usage:
automsuupdater.cmd "X:\Long Path To My Updates"
automsuupdater.cmd X:\Path\To\Updates

@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.


#5 OP Tantawi

Tantawi

    Neowinian Senior

  • Joined: 02-March 04
  • Location: Switzerland
  • OS: Windows 8.1 64-bit
  • Phone: Sony Xperia Z

Posted 09 May 2007 - 15:42

Man that's simply amazing!! :woot:

Thanks a million for your time and effort creating this excellent script! :star:

Microsoft Windows [Version 6.0.6000]
Copyright © 2006 Microsoft Corporation. All rights reserved.

E:\Downloads>update E:\Downloads

Please wait, processing update files in E:\Downloads...
Processing: E:\Downloads\Windows6.0-KB932653-x86.msu...
Processing: E:\Downloads\Windows6.0-KB933272-v2-x86.msu...

Done.

E:\Downloads>



#6 Wilhelmus

Wilhelmus

    Neowinian

  • Joined: 19-February 05
  • Location: Finland

Posted 09 May 2007 - 15:43

No problem. Glad you got it working. :)