I’m using PSADT for years now in all my app deployments.
Now I have to make use of the Show-InstallationRestartPrompt function to prompt for a reboot before the last part of the script can continue.
What I’m trying to use is this:
Show-InstallationRestartPrompt -NoCountdown
Anyway, the issue I’m facing is that the restart prompt is not displayed at all. But for instance the “Show-InstallationPrompt” with a custom message is displayed without problems as well as balloon tips.
“Allow users to view and interact with the program installation” is checked
As I mentioned, when I add other prompts and balloon tips, these are displayed nicely. So my “interactive” deployment is working. I’m just not sure why the restart prompt is not showing.
In the toolkit log file it says that it is displaying the prompt:
[Pre-Installation] :: Invoking Show-InstallationRestartPrompt asynchronously with no countdown...
Exact same issue here. Except I have my Show-InstallationRestartPrompt command in the [Post-Installation] section. Log seems to show everything is proper but the prompt NEVER shows!
[Post-Installation] :: PS_AppDeployToolkitMain_3.8.4_EN_01 Installation completed with exit code [3010].
Exit-Script
2/16/2021 4:05:14 PM
23544 (0x5BF8)
[Post-Installation] :: Check if PowerPoint is in either fullscreen slideshow mode or presentation mode…
Test-PowerPoint
2/16/2021 4:05:14 PM
23544 (0x5BF8)
[Post-Installation] :: PowerPoint application is not running.
Test-PowerPoint
2/16/2021 4:05:14 PM
23544 (0x5BF8)
[Post-Installation] :: PowerPoint is running in fullscreen mode [False].
Test-PowerPoint
2/16/2021 4:05:14 PM
23544 (0x5BF8)
[Post-Installation] :: Display balloon tip notification asynchronously with message [Installation complete. A reboot is required.].
The problem seems to be a change in 3.8.4 that uses Switch rather than If-Then-Else.
(line 7891 of AppDeployToolkitMain.ps1 that processes $installRestartPromptParameters)
The problem is that $_ is used, and the Switch function itself overwrites this dynamic variable.
In the end you just get a dash for each original parameter, and when this is feeded into the Start-Process on line 7908, you end up with "-ShowInstallationRestartPrompt - ", which makes the process crash (you get 2 Windows Error Reporting events (ID 1001) in the application event log).
Blockquote[quote=“pki-vdp, post:9, topic:3140, full:true”]
The problem seems to be a change in 3.8.4 that uses Switch rather than If-Then-Else.
(line 7891 of AppDeployToolkitMain.ps1 that processes $installRestartPromptParameters)
The problem is that $_ is used, and the Switch function itself overwrites this dynamic variable.
In the end you just get a dash for each original parameter, and when this is feeded into the Start-Process on line 7908, you end up with "-ShowInstallationRestartPrompt - ", which makes the process crash (you get 2 Windows Error Reporting events (ID 1001) in the application event log).
[/quote]