Hi,
I'm testing the beta 3.5.0 on Win7x64, deploying via SCCM2012, using deploy-application.exe.
For this app I need to first uninstall the previous version as it cannot handle an upgrade. When I attempt any uninstall as shown below, the logs show that it detects the installed app ok but doesnt uninstall it, instead it notes it will skip the 'install' as the MSI is already installed.
I believe this is caused by the check at line 1952, which does not take into account the $action value, which should, if its anything other than "Install", skip the detection as any 'Uninstall/Repair/etc' of course requires the MSI installed.
Or let me know if I've implemented my action statements incorrectly(!)
Deploy-Application.ps1 excerpt:
...
## <Perform Pre-Installation tasks here>
Execute-MSI -Action Uninstall -Path '{3B037825-A72D-4B41-BA9F-BC8EDC9254FA}' # Uninstall ver 2.3.x
...
Log shows it finds this version installed, but instead of uninstalling it instead 'skips installation'
...
[Pre-Installation] :: Found installed application [Salesforce for Outlook - (Production Release 2.3.05.1231) - P1] version [2.3.05.1231] matching product code [{3B037825-A72D-4B41-BA9F-BC8EDC9254FA}] Get-InstalledApplication 11/11/2014 4:51:03 PM 1 (0x0001)
[Pre-Installation] :: The MSI is already installed on this system. Skipping installation... Execute-MSI 11/11/2014 4:51:03 PM 1 (0x0001)
...
I addedthe logic (-and $action -eq 'Install') as below and it then works, but that IF statement should really go above the Get-InstalledApplication check for efficiency:
...
[psobject]$IsMsiInstalled = Get-InstalledApplication -ProductCode $MSIProductCode
If ($IsMsiInstalled -and $action -eq 'Install') {
Write-Log -Message 'The MSI is already installed on this system. Skipping installation...' -Source ${CmdletName}
}
Else {
...
Thanks for the effort you guys have put into this new release, lots of good updates here!
Comments: Thanks for reporting this issue. The latest beta 3.5.0 has the fix integrated now.
I'm testing the beta 3.5.0 on Win7x64, deploying via SCCM2012, using deploy-application.exe.
For this app I need to first uninstall the previous version as it cannot handle an upgrade. When I attempt any uninstall as shown below, the logs show that it detects the installed app ok but doesnt uninstall it, instead it notes it will skip the 'install' as the MSI is already installed.
I believe this is caused by the check at line 1952, which does not take into account the $action value, which should, if its anything other than "Install", skip the detection as any 'Uninstall/Repair/etc' of course requires the MSI installed.
Or let me know if I've implemented my action statements incorrectly(!)
Deploy-Application.ps1 excerpt:
...
## <Perform Pre-Installation tasks here>
Execute-MSI -Action Uninstall -Path '{3B037825-A72D-4B41-BA9F-BC8EDC9254FA}' # Uninstall ver 2.3.x
...
Log shows it finds this version installed, but instead of uninstalling it instead 'skips installation'
...
[Pre-Installation] :: Found installed application [Salesforce for Outlook - (Production Release 2.3.05.1231) - P1] version [2.3.05.1231] matching product code [{3B037825-A72D-4B41-BA9F-BC8EDC9254FA}] Get-InstalledApplication 11/11/2014 4:51:03 PM 1 (0x0001)
[Pre-Installation] :: The MSI is already installed on this system. Skipping installation... Execute-MSI 11/11/2014 4:51:03 PM 1 (0x0001)
...
I addedthe logic (-and $action -eq 'Install') as below and it then works, but that IF statement should really go above the Get-InstalledApplication check for efficiency:
...
[psobject]$IsMsiInstalled = Get-InstalledApplication -ProductCode $MSIProductCode
If ($IsMsiInstalled -and $action -eq 'Install') {
Write-Log -Message 'The MSI is already installed on this system. Skipping installation...' -Source ${CmdletName}
}
Else {
...
Thanks for the effort you guys have put into this new release, lots of good updates here!
Comments: Thanks for reporting this issue. The latest beta 3.5.0 has the fix integrated now.