SOLVED
I resolved my issue by using the MSI product code for the app that needed to be uninstalled. Which turned out to be better because I saved 700MB of space in the package by not including the source of the old app.
Here is what I used
Execute-MSI -Action ‘Uninstall’ -Path ‘{Product code goes here}’
Thanks for the replies.
SOLVED
Hello,
I am trying to uninstall an old version of an app before installing the new one with this…
“Execute-Process -Path “$dirSupportFiles\AppName.exe” -Parameters ‘/X /S /v/qn’ -WindowsStyle Hidden”
This string works if the app is installed, but in cases where it isn’t installed the script fails with an “Execution failure 1605”.
Using an extracted .msi will work if the old app is installed or not. But I want to know how I can get an .exe to work in this way too.
Thank you for any advice.