I am using PSADT v3.9.2 to manage deployment of Fortinet FortiClient 7.2.1 using MSI files.
The install process works fine. However, when attempting to uninstall, the FortiClient uninstallation process seems to be restarting the system automatically, which is not the desired behavior. I would like to perform a silent uninstallation but prompt the user to restart after the uninstallation has finished.
I originally tried the following command for the uninstall:
This results in the computer automatically restarting without a prompt. Additionally, I have two additional lines (to set a couple of firewall rules) in the PSADT script immediately following the uninstall line that are not executed, which makes me think that the FortiClient uninstallation routine is causing the restart.
If I remove the -Parameters modifier from the uninstallation line, the product uninstalls successfully, with no prompt to restart, and the log indicates "Execution completed successfully with exit code . A reboot is required."
How do I need to configure the -Parameters setting to combine a silent uninstallation with a prompted reboot?
This sounds like a similar challenge we had with the Cisco Secure Client upgrade, as this contains multiple MSI installers (3 in our case), we supress the restart during each MSI install and then (as @That-Annoying-Guy suggested) we use the Show-InstallationRestartPrompt, and give the user a deadline.
N.B. We are using Intune to deploy, we deploy the app as System and use ServiceUI.exe (from MDT) to bring any prompts through to the users context.
Thank you all very much. I will try using Show-InstallationRestartPrompt as suggested.
I’m also using Intune with ServiceUI for the installations. Our organization is relatively new to having Intune (or any sort of device management system beyond what comes with Windows itself) and having to do app packaging and customization.
It’d be difficult to overstate how helpful the PSADT has been in making the overall process much easier and more consistent, so our gratitude goes out to everyone who has committed their time and effort to this project!
Just a tip (I learned from another post by @That-Annoying-Guy ), remember to exit the script after the Show-InstallationRestartPrompt - I also find putting a short sleep in the code assists too.
His original advice: