A Package with the MSU file with a script to install it is needed as follows:
- Create a Windows batch file (ie. install-msu.bat) in the same folder as the MSU file (see the following example). This will install the MSU in silent mode and do not prompt for reboot. As the log file from wusa.exe is in Event format evtx, it must be converted to text file so it can be viewed in the Job Output tab of the job. In this example we'll create a package for KB3133719:
wusa.exe KB3133719-x64.msu.msu /quiet /norestart /log:%Temp%\wusa-KB3133719.evtx
WEVTUtil query-events %Temp%\wusa-KB3133719.evtx /lf:true /format:text /q:"*" > %1
In this script we run wusa.exe to install the patch and create a log file in evtx format and save the return code to end the script with it. Then, we convert the evtx log file to text format and copy it to the file referenced by %1 that will be the first parameter defined in the install procedure that will be $rf so the log can be reviewed in the Job Output tab of the job. Also deletes the temporary log file in evtx format.
- Create a software package that includes the mentioned script together with the MSU file:
- Create an Install procedure to run the install script and define $rf as the first parameter as follows ($#bg can also be added to run it in background):
- Seal the package and deploy to the agents.