Prompt User in Silent Mode When Excel is open

I am installing an application that needs Excel to be closed. When having the switch silent, the script closes Excel automatically. If Excel is not open, the script can install the application silently and this is perfect, but I want the users to get the prompt when Excel is open so that they can save their works under silent mode. Is this possible when silent mode or noninteractive mode?

Many Thanks.


The silent mode will silence all windows and popups, so if you want to be able prompt to the user then you need to use interactive mode. The script can be silent if you don’t use Show-InstallationProgress and configure to hide pop-ups in the XML file.

You could use something like this for closing excel.

Show-InstallationWelcome -PromptToSave -CloseApps 'excel' -AllowDeferCloseApps -DeferTimes 3 -CloseAppsCountdown 3600 -BlockExecution -PersistPrompt

This will only prompt the user when excel is running and allows the user to close excel. A user will be allowed to defer the installation for 3 times and the 3rd time it will close the excel automatically in 1 hour. Excel will stay blocked until the installation is finished.