PSADT 3.5.0 fails to process condition logic that processes successfully in PSADT 3.1.4.

Topics: Archive - Deployment Scripts
Feb 17, 2015 at 8:01 PM
Edited Feb 18, 2015 at 2:42 PM
During an installation attempt, PSADT 3.5.0 fails to process condition logic that processes successfully in PSADT 3.1.4.
if ((Get-InstalledApplication -Name 'Wireshark 1.12.3 (64-bit)') -eq $appName -and $appDisplayVersion -eq $appVersion) {
    
        Show-InstallationPrompt -Message 'An installation of $appName $appVersion exists.' -ButtonRightText 'Ok' -Icon Information -NoWait; Write-Log 'ErrorCode Return value is: 1638, proceeding.'; Exit-Script -ExitCode 1638
    } else {
    
        # Show Welcome Message, close Internet Explorer if required, allow up to 3 deferrals, verify there is enough disk space to complete the install and persist the prompt
        Show-InstallationWelcome -CloseApps 'wireshark,op_flse,aceanalyst' -AllowDefer -DeferTimes 5 -CheckDiskSpace -PersistPrompt
    
        # Show Progress Message (with the default message)
        Show-InstallationProgress
        }
The "installation prompt" should appear indicating that the product is installed and subsequently halt the installation yet the condition is ignored and the installation proceeds. This suggests to me that the logic is functioning to some degree, however, in reverse evidenced by the captured verbose log output.
[02-17-2015 14:35:08.300] [Pre-Installation] [Get-InstalledApplication] :: Get information for installed Application Name(s) [Wireshark 1.12.3 (64-bit)]...
[02-17-2015 14:35:09.125] [Pre-Installation] [Get-InstalledApplication] :: Found installed application [Wireshark 1.12.3 (64-bit)] version [1.12.3] matching application name [Wireshark 1.12.3 (64-bit)]
[02-17-2015 14:35:09.200] [Pre-Installation] [Show-InstallationWelcome] :: Evaluate disk space requirements.
[02-17-2015 14:35:09.221] [Pre-Installation] [Get-FreeDiskSpace] :: Retrieve free disk space for drive [C:].
[02-17-2015 14:35:09.258] [Pre-Installation] [Get-FreeDiskSpace] :: Free disk space for drive [C:]: [16629 MB].
[02-17-2015 14:35:09.283] [Pre-Installation] [Show-InstallationWelcome] :: Successfully passed minimum disk space requirement check.
[02-17-2015 14:35:09.309] [Pre-Installation] [Get-DeferHistory] :: Get deferral history...
The variables are also ignored, the "installation prompt" displays the following text:
The installation of $appName $appVersion complete.
During an uninstallation attempt, PSADT 3.5.0 fails process condition logic that processes successfully in PSADT 3.1.4.
if ((Get-InstalledApplication -Name 'Wireshark 1.12.3 (64-bit)') -eq $appName -and $appDisplayVersion -eq $appVersion)  {
    
        # Show Welcome Message, close Internet Explorer if required with a 60 second countdown before automatically closing
        Show-InstallationWelcome -CloseApps 'wireshark,op_flse,aceanalyst' -CloseAppsCountdown '60'
    
        # Show Progress Message (with the default message)
        Show-InstallationProgress
The "installation prompt" appears indicating that the product is not installed which seems to suggest that the logic is functioning to some degree, however, in reverse evidenced by the captured verbose log output. The installation is halted despite the product being installed.
[02-17-2015 13:48:15.112] [Pre-Uninstallation] [Get-InstalledApplication] :: Get information for installed Application Name(s) [Wireshark 1.12.3 (64-bit)]...
[02-17-2015 13:48:15.900] [Pre-Uninstallation] [Get-InstalledApplication] :: Found installed application [Wireshark 1.12.3 (64-bit)] version [1.12.3] matching application name [Wireshark 1.12.3 (64-bit)]
[02-17-2015 13:48:15.937] [Pre-Uninstallation] [Show-InstallationPrompt] :: Displaying custom installation prompt with the non-default parameters: [-NoWait:$true -ButtonRightText "Ok" -Icon "Information" -Message "$appName $appVersion is not nstalled."]...
[02-17-2015 13:48:15.975] [Pre-Uninstallation] :: ErrorCode Return value is: 1605, proceeding.
[02-17-2015 13:48:15.988] [Pre-Uninstallation] [Exit-Script] :: Wireshark_1.12.3_EN_01 Uninstallation completed with exit code [1605].
The variables are also ignored, the "installation prompt" displays the following text:
$appName $appVersion is not nstalled.
How do I fix this?

Best Regards,

Yves
Feb 25, 2015 at 6:38 AM
Resolution can be found in Discussion thread 580582 special thanks to Dan.
Marked as answer by yralexandre on 2/24/2015 at 10:38 PM