SCCM 2012 - Installing multiple Windows 7 hotfixes(.msu) with SCCM

With SCCM if you need to create package to install .msu file you must use following syntax:

Wusa.exe c:\temp\FILExxxxx.msu /quiet /norestart

Otherwise you can use following script that will parse all the files in the same directory as the script and install all files which ends with .MSU automatically.

Dim objfso, objShell

Dim folder, files, sFolder, folderidx, Iretval, return

Set objfso = CreateObject("Scripting.FileSystemObject")

Set objShell = CreateObject("Wscript.Shell")

sFolder = left(WScript.ScriptFullName,

Set folder = objfso.GetFolder(sFolder)
Set files = folder.Files

For each folderIdx In files

If Ucase(Right(,3)) = "MSU" then

wscript.echo "wusa.exe " & sfolder & & " /quiet /norestart"
iretval=objShell.Run ("wusa.exe " & sfolder & & " /quiet /norestart", 1, True)

If (iRetVal = 0) or (iRetVal = 3010) then

wscript.echo & " Success"


wscript.echo & " Failed"


End If

End If


Original article: