Loading
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 .

      1. $action = Get-Property -name <some property>switch ( $action){ Installing { do something to install my stuff } Uninstalling { do something to uninstall my stuf } Patch { do something whe patching }}
      Expand Post
        • If I understand this well, I could write something like

           

          if (Get-Property -name REMOVE){

           

          we are uninstalling

           

          } elif (Get-Property -name REMOVE) {

           

          we are upgrading

           

          } else {

           

          we are installing (from scratch)

           

          }

           

          Expand Post
          • Hello,

            REMOVE -> uninstallation

            Not REMOVE And Installed -> it could be update (? please check it on test system)

            Not Installed -> new installation

            Regards

            Roman

             

             

             

            Expand Post

Loading
Execute powershell action only when installing (not when uninstalling)