Well I checked this out and I don't see where WUSA has anything to do with installing or passing by if already installed updates. Here is what I did: I Took 5 msu updates that were already installed on my system and tried to install them one by one manually. They all checked my system first and said that they were already installed, so the did not reinstall. Then I took NICK@NUMBER11 and s1ave77 bat file and changed WUSA "%%A" /quiet /norestart to WUSA "%%A" /passive Same result on the same 5 msu updates. They would pop up saying they were already installed. One more try with this bat file, No WUSA Again same results they would not install because they were already installed. Conclusion here is that it is the msu installer themselves that are passing by the installed updates and not because of WUSA Or am I missing something??
I think the point made was that if they are already installed, they won't be re-installed not matter what method is used...
@oldsh_t as Flipp3r told you, also actually what happens when you attempt to install a .msu update by opening it (as i guess this what you did with the last 'for' loop) the Windows just sends its complete path and filename to "WUSA.exe" which in turn attempts to extract the .msu update package first before doing the comparison to see whether this update is installed or not. so what i'm trying to tell you is that, not the msu installer that does the check but WUSA.exe, and yes you're right they're not going to be installed again but skipped. EDIT: to proof the idea that WUSA.exe is responsible for installing .msu files (by a trivial example) even if you double clicked them (opened them as standalone installers), simply create an empty text file and change its extension to .msu then try to open it, you'll get an error message from wusa saying: "The file or directory is corrupted and unreadable" if this was a standalone installer you'll get the error message that you usually see when opening a corrupted executable file, not a message from wusa.
sure, like you did just loop through each file and start it with the required parameters/switches and its location with switches will be sent to wusa automatically
My idea for install updates : Code: @echo off set ARCH=%PROCESSOR_ARCHITECTURE% echo %ARCH% if %ARCH%==x86 ( call "%~dp0commands.bat" "%~dp0x86" "y" "n" "" "x" ) else ( call "%~dp0commands.bat" "%~dp0x64" "y" "n" "" "x" ) exit
yep, will work as expected. also you could make it a little bit shorter: Code: @echo off set ARCH=%PROCESSOR_ARCHITECTURE% echo %ARCH% if %ARCH%==x86 (set "updatesDir=%~dp0x86") else (set "updatesDir=%~dp0x64") call "%~dp0commands.bat" "%updatesDir%" "y" "n" "" "x" exit you know, just to type the 'call' statement only once and make it maintainable in case you want to change the parameters sent to the script later on, you would then have to change it only once. Edit: also if you want to install .cab updates, you might want to add the sixth parameter "runAs" : Code: call "%~dp0commands.bat" "%updatesDir%" "y" "n" "" "x" "runAs" since DSIM.exe requires an elevated script