
hk932457 asked a question.
Execute powershell action only when installing (not when uninstalling)
I run a powershell script when installing my stuff.
Is there a way to tell InstallShield 2018 not to run the script when uninstalling ?
Or maybe there is a property I can test to avoid execution of the commandlets of my powershell script.
Set condition to Custom Action "Not Installed"
Ok, and is there a way to test a property in the powershell that would make it possible to write something like .
Look at Installer Property
Property
Patch, Installed, REMOVE
if (Get-Property -name REMOVE){
we are uninstalling
} elif (Get-Property -name REMOVE) {
we are upgrading
} else {
we are installing (from scratch)
}Hello,
REMOVE -> uninstallation
Not REMOVE And Installed -> it could be update (? please check it on test system)
Not Installed -> new installation
Regards
Roman