PSAppDeployToolkit icon indicating copy to clipboard operation
PSAppDeployToolkit copied to clipboard

Repair Function and Additional Parameters

Open pandrews1976 opened this issue 4 years ago • 3 comments

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

pandrews1976 avatar May 29 '20 19:05 pandrews1976

Have you tested this with any other msi?

luki1412 avatar Jun 01 '20 06:06 luki1412

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.

cyborgrd avatar Jun 03 '20 09:06 cyborgrd

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

luki1412 avatar Jun 26 '20 10:06 luki1412