PSADT v3.5.6 Show-InstallationPrompt conflicts

At the end of the script execution “Show-InstallationPrompt” is being called to display a message to the user indicating that the install/uninstall is complete. I noticed that in the title bar the following is rendered “$appVendor $DisplayName $DisplayVersion” which is appended by 01 (e.g. Riverbed Wireshark 1.12.7 01). Oddly this anomaly is isolated to the Show-InstallationPrompt function call in that it is not reflected any of the preceding dialog titlebars.

Actual function call from with in a function defined in the AppDeployToolkitExtions.ps1:
Show-InstallationPrompt -Message "$DisplayName $DisplayVersion not installed." -ButtonMiddleText 'OK' -Icon Information -NoWait; Write-Log "ErrorCode Return value is: [1605], proceeding."; Exit-Script -ExitCode 1605

The log entries indicating that Show-InstallationPrompt function called and parameters used.
[08-20-2015 15:44:42.594] [Pre-Uninstallation] [Show-InstallationPrompt] :: Displaying custom installation prompt with the non-default parameters: [-NoWait:$true -Icon “Information” -ButtonMiddleText “OK” -Message “Wireshark 1.12.7 not installed.”].
[08-20-2015 15:44:42.687] [Pre-Uninstallation] :: ErrorCode Return value is: [1605], proceeding.
[08-20-2015 15:44:42.714] [Pre-Uninstallation] [Exit-Script] :: CAS00ACB_Wireshark_1.12.7_01 Uninstallation completed with exit code [1605].
[08-20-2015 15:44:42.755] [Pre-Uninstallation] [Show-BalloonTip] :: Display balloon tip notification asyhchronously with message [Uninstallation failed.].
[08-20-2015 15:44:42.816] [Pre-Uninstallation] [Execute-Process] :: [C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe] is a valid fully qualified path, continue.
[08-20-2015 15:44:42.880] [Pre-Uninstallation] [Execute-Process] :: Working Directory is [C:\WINDOWS\System32\WindowsPowerShell\v1.0].
[08-20-2015 15:44:42.890] [Pre-Uninstallation] [Execute-Process] :: Executing [C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe [PowerShell ScriptBlock]]…
[08-20-2015 15:44:42.948] [Pre-Uninstallation] [Execute-Process] :: NoWait parameter specified. Continuing without waiting for exit code…
[08-20-2015 15:44:42.996] [Pre-Uninstallation] [Exit-Script] :: -------------------------------------------------------------------------------

In an attempt to resolve the problem I made the following change (by adding -Title “$appVendor $DisplayName $DisplayVersion”) which results in a complete failure to display Show-InstallationPrompt

Actual function call from with in a function defined in the AppDeployToolkitExtions.ps1:
Show-InstallationPrompt -Title "$appVendor $DisplayName $DisplayVersion" -Message "$DisplayName $DisplayVersion not installed." -ButtonMiddleText 'OK' -Icon Information -NoWait; Write-Log "ErrorCode Return value is: [1605], proceeding."; Exit-Script -ExitCode 1605

The log entries indicating that Show-InstallationPrompt function called and parameters used.
[08-20-2015 16:20:26.889] [Pre-Uninstallation] [Show-InstallationPrompt] :: Displaying custom installation prompt with the non-default parameters: [-NoWait:$true -Icon “Information” -ButtonMiddleText “OK” -Message “Wireshark 1.12.7 not installed.” -Title “Wireshark 1.12.7”].
[08-20-2015 16:20:26.994] [Pre-Uninstallation] :: ErrorCode Return value is: [1605], proceeding.
[08-20-2015 16:20:27.020] [Pre-Uninstallation] [Exit-Script] :: CAS00ACB_Wireshark_1.12.7_01 Uninstallation completed with exit code [1605].
[08-20-2015 16:20:27.058] [Pre-Uninstallation] [Show-BalloonTip] :: Display balloon tip notification asyhchronously with message [Uninstallation failed.].
[08-20-2015 16:20:27.116] [Pre-Uninstallation] [Execute-Process] :: [C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe] is a valid fully qualified path, continue.
[08-20-2015 16:20:27.179] [Pre-Uninstallation] [Execute-Process] :: Working Directory is [C:\WINDOWS\System32\WindowsPowerShell\v1.0].
[08-20-2015 16:20:27.191] [Pre-Uninstallation] [Execute-Process] :: Executing [C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe [PowerShell ScriptBlock]]…
[08-20-2015 16:20:27.268] [Pre-Uninstallation] [Execute-Process] :: NoWait parameter specified. Continuing without waiting for exit code…
[08-20-2015 16:20:27.305] [Pre-Uninstallation] [Exit-Script] :: -------------------------------------------------------------------------------

By removing “-NoWait” parameter the following is rendered in titlebar of Show-InstallationPrompt “$appVendor $DisplayName $DisplayVersion” (e.g. Riverbed Wireshark 1.12.7 01). This is the desired state; however, without specifying the -NoWait parameter the CM12 deployment will not proceed (and impedes subsequent CM12 deployments) until the user interacts with the dialogue. Although this can be remedied by specifying a shorter time out threshold (via -Timeout parameter as I understand it) it is not a suitable long-term solution.

Actual function call from with in a function defined in the AppDeployToolkitExtions.ps1:
Show-InstallationPrompt -Title "$appVendor $DisplayName $DisplayVersion" -Message "$DisplayName $DisplayVersion not installed." -ButtonMiddleText 'OK' -Icon Information; Write-Log "ErrorCode Return value is: [1605], proceeding."; Exit-Script -ExitCode 1605

The log entries indicating that Show-InstallationPrompt function called and parameters used.
[08-20-2015 16:41:14.411] [Pre-Uninstallation] [Show-InstallationPrompt] :: Displaying custom installation prompt with the non-default parameters: [-Icon “Information” -ButtonMiddleText “OK” -Message “Wireshark 1.12.7 not installed.” -Title “Wireshark 1.12.7”].
OK
[08-20-2015 16:41:25.808] [Pre-Uninstallation] :: ErrorCode Return value is: [1605], proceeding.
[08-20-2015 16:41:25.852] [Pre-Uninstallation] [Exit-Script] :: CAS00ACB_Wireshark_1.12.7_01 Uninstallation completed with exit code [1605].
[08-20-2015 16:41:25.885] [Pre-Uninstallation] [Show-BalloonTip] :: Display balloon tip notification asyhchronously with message [Uninstallation failed.].
[08-20-2015 16:41:25.950] [Pre-Uninstallation] [Execute-Process] :: [C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe] is a valid fully qualified path, continue.
[08-20-2015 16:41:26.003] [Pre-Uninstallation] [Execute-Process] :: Working Directory is [C:\WINDOWS\System32\WindowsPowerShell\v1.0].
[08-20-2015 16:41:26.013] [Pre-Uninstallation] [Execute-Process] :: Executing [C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe [PowerShell ScriptBlock]]…
[08-20-2015 16:41:26.092] [Pre-Uninstallation] [Execute-Process] :: NoWait parameter specified. Continuing without waiting for exit code…
[08-20-2015 16:41:26.130] [Pre-Uninstallation] [Exit-Script] :: -------------------------------------------------------------------------------

Thanks,

Yves

This forum is meant for posts sharing completed functions with the community meant to extend the toolkit and provide functionality we haven’t built into the toolkit. Your post is better organized under the “General” forum or in the Issues list on GitHub where we track bugs.

Did you mean v3.6.5 in the title instead of 3.5.6?

On line 1552, replace $installName with $Title. Does that fix your problem?

I apologize for posting to the wrong forum. I’m willing to repost to the General forum if you’d prefer or feel free to move it if possible. To answer your question Yes I meant 3.6.5 instead of 3.5.6. Secondarily, replacing -Title “$appVendor $DisplayName $DisplayVersion” with -Title $installName unfortunately does not resolve the problem, it still fails to display the Show-InstallationPrompt dialog unless the -NoWait parameter is omitted. However, even after omitting the -NoWait parameter when the Show-InstallationPrompt dialog is displayed “Riverbed Wireshark 1.12.7 01” is still being displayed in the title bar as opposed to “Riverbed Wireshark 1.12.7” which is the real problem. The $appRevision = ‘’ variable is left blank intentioanlly, yet it appears that it is defaulting to $appRevision = ‘01’ and append itself to the end of the text in the title bar whether -Title “$appVendor $DisplayName $DisplayVersion” or -Title $installName is used or omitted.

Thanks,

Yves

I’m a little confused from your post about what you changed.

I am suggesting that Line 1552 should be changed to this:


Start-Process -FilePath "$PSHOME\powershell.exe" -ArgumentList "-ExecutionPolicy Bypass -NoProfile -NoLogo -WindowStyle Hidden -File <code>"$scriptPath</code>" -ReferringApplication <code>"$Title</code>" -ShowInstallationPrompt $installPromptParameters" -WindowStyle 'Hidden' -ErrorAction 'SilentlyContinue'

Also, move line 9854 into the “If” block right above it.

See if this solves your problem.