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