PSAppDeployToolkit
PSAppDeployToolkit copied to clipboard
Repair Function and Additional Parameters
By design when using msiexec.exe /f it does not accept any additional PROPERTIES, i.e. REBOOT=ReallySuppress. Therefore if the repaired msi has a forced reboot in their and you are using /passive or /quiet the system will reboot automatically, especially if the exit code is 1641 which Configuration Manager will pickup and trigger reboot immediately, no warning, same if running from the command-line.
To Reproduce We found this error while installing the latest Bluebeam software and testing the the repair functionality. When using deploy-application -deploymenttype repair and setting our parameters in the script to be:
Execute-MSI -Action Repair -Path "$dirFiles\x64\Bluebeam Revu x64 19.msi" -Parameters REBOOT=ReallySuppress BB_DEFAULTVIEWER=1 BB_DESKSHORTCUT=0 BB_DESKSTAPLER=0 BB_IE_PLUGIN=0 BB_DISABLEANALYTICS=1 DA=1 /passive" -SkipMSIAlreadyInstalledCheck
None of the additional properties we taken into account when the command actually ran. To work around this you have to set the Action to Install and then add the properties REINSTALLMODE=omus REINSTALL=ALL.
Toolkit Version: 3.8.2
Have you tested this with any other msi?
I can confirm. the /f option ignores REBOOT=ReallySuppres. I think also, we need default parameters in the config.xml also for Repair not only Install and Uninstall.
This is by design. Just checked the documentation: /f - Repairs a product. This option ignores any property values entered on the command line.
https://docs.microsoft.com/en-us/windows/win32/msi/command-line-options