-ShowInstallationRestartPrompt -NoCountdown not visiable Version 3.5

Topics: Archive - Deployment Scripts, Archive - General
Jan 26, 2015 at 10:42 PM
Edited Jan 26, 2015 at 10:43 PM
With -Countdownseconds 600 -CountdownNoHideSeconds 60 works correctly.
With -NoCountdown no restart prompt ever shows. No error in the logs
Feb 2, 2015 at 4:28 PM
I changed line 5459 in appdeploytoolkitmain.ps1 to -NoCountdown
Start-Process -FilePath "$PSHOME\powershell.exe" -ArgumentList "-ExecutionPolicy Bypass -NoProfile -NoLogo -WindowStyle Hidden -File "$scriptPath" -ReferringApplication "$installName" -ShowInstallationRestartPrompt -NoCountdown" -WindowStyle Hidden -ErrorAction 'SilentlyContinue'

And reboot prompt is working now. Not sure if there was a better place to make the change so the parameters variable would have been correct.
Feb 23, 2015 at 9:00 PM
Instead of changing it this way you only need to change this line (Change File to Command)

Line 5458 Version 3.5.0
        Start-Process -FilePath "$PSHOME\powershell.exe" -ArgumentList "-ExecutionPolicy Bypass -NoProfile -NoLogo -WindowStyle Hidden -File `"$scriptPath`" -ReferringApplication `"$installName`" -ShowInstallationRestartPrompt $installRestartPromptParameters" -WindowStyle Hidden -ErrorAction 'SilentlyContinue'

To this:
        Start-Process -FilePath "$PSHOME\powershell.exe" -ArgumentList "-ExecutionPolicy Bypass -NoProfile -NoLogo -WindowStyle Hidden -Command `"$scriptPath`" -ReferringApplication `"$installName`" -ShowInstallationRestartPrompt $installRestartPromptParameters" -WindowStyle Hidden -ErrorAction 'SilentlyContinue'
Feb 24, 2015 at 7:24 PM
Perfect. Thank you for the answer.
Mar 3, 2015 at 12:53 PM
Ran into the issue as well and the command actually passes ":$true" to the switch NoCountDown and this fails.
I changed the building of installRestartPromptParameters. Removing :$" + "$($_.Value)".ToLower()
where type equals SwitchParameters

[string]$installRestartPromptParameters = ($installRestartPromptParameters.GetEnumerator() | ForEach-Object {

            If ($_.Value.GetType().Name -eq 'SwitchParameter') 
            ElseIf ($_.Value.GetType().Name -eq 'Boolean') 
                "-$($_.Key) `$" + "$($_.Value)".ToLower() 
            ElseIf ($_.Value.GetType().Name -eq 'Int32') 
                "-$($_.Key) $($_.Value)" 
                "-$($_.Key) `"$($_.Value)`"" 
            }) -join ' '
Mar 3, 2015 at 9:34 PM
Thanks for the fix - committed to source code.
Mar 9, 2015 at 10:01 PM
I just found this project a couple of months ago and I think it's great work. I am still seeing the issue with the latest 3.6 builds from 3/4. I am using Altiris Notification Server and this is one of the last things to work out. Manually the prompt is there. It's also there from a Admin cmd box but it does not appear when pushed from Altiris.

Command-Line used => Deploy-Application.exe -AllowRebootPassThru -TerminalServerMode -DeploymentType Install

Script Snippet => Show-InstallationRestartPrompt -Countdownseconds 600 -CountdownNoHideSeconds 60

Error from log file.
<![LOG[[Post-Installation] :: Invoking Show-InstallationRestartPrompt asynchronously with a [600] second countdown...]LOG]!><time="14:38:16.386-420" date="03-09-2015" component="Show-InstallationRestartPrompt" context="NT AUTHORITY\SYSTEM" type="1" thread="3" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Change terminal server into user execute mode...]LOG]!><time="14:38:16.461-420" date="03-09-2015" component="Disable-TerminalServerInstallMode" context="NT AUTHORITY\SYSTEM" type="1" thread="3" file="Deploy-Application.ps1">
<![LOG[[Post-Installation] :: Failed to change terminal server into user execute mode.

These test machines are virtual boxes so I expect the warning about RDP sessions. Note, I have seen the same issue on physical machine. No restart prompt.

Is there anything I should be looking for to help track this down.