Feb 17, 2017
07:35 AM
Ok, I found the problem (really strange by the way...) My script was not working because it needed another script to work.. As my original script was not working, I created a new one (another powershell script) which was only displaying a form : [CODE][System.Windows.Forms.MessageBox]::Show("My Custom Action","Hello", 0, 64)[/CODE] I removed my original script from the sequences and I have been trying to run my test script at all positions in the UI and Exec sequences With no success.. So, I tried to run my first script again, but I forgot to desactivate my test script And, miraculously, it works ! I don't know if it is an Installshield problem or maybe a wrong defined or forgotten parameter But the fact is, in order to run a powershell script (before install process in my case) follow these steps: For the new script 1) Create a new Powershell custom action (in addition to your script) 2) In the common tab : PowerShell Script File Name -> Path to an empty script ps1 Return Processing -> Synchronous (Check exit code) In-Script Execution -> Immediate execution Execution scheduling -> Always execute Install UI Sequence -> Install Exec Sequence -> + Install Exec Condition -> Not Installed For your custom script In the common tab : PowerShell Script File Name -> Path to your script ps1 Return Processing -> Synchronous (Check exit code) In-Script Execution -> Immediate execution Execution scheduling -> Always execute Install UI Sequence -> Install Exec Sequence -> + Install Exec Condition -> Not Installed If, for example, you add a form in the new script, it will not be executed, but allows the second one to run.. If someone has an explanation, feel free to share ! Thank you and enjoy
... View more
Feb 15, 2017
10:13 AM
chad.petersen wrote: The Exec Sequence does not happen until you get all of the way through the UI Sequence. It sounds like you've got it scheduled to run in the wrong sequence for what you are wanting. Try changing it to the UI Sequence instead. Chad I have already tryed to change the UI Sequence, it's not working Any other idea ?
... View more
Feb 15, 2017
09:25 AM
Hi, I'm trying to run a PowerShell script before installing my application via the MSI package I would like my script to run directly when the user is double clicking on the MSI I have already tried to do this : On Behavior and Logic -> Custom actions and Sequences Custom actions -> New PowerShell -> Stored in Binary Table On Common table : PowerShell Script File Name -> Path to my ps1 script Return Processing -> Synchronous (Check exit code) In-Script Execution -> Immediate execution Execution scheduling -> Always execute Install Exec Sequence -> But my script is not running when my MSI is launched Did I forgot something ? Thank you
... View more
Labels
- Labels:
-
InstallShield 2016
Latest posts by DjessHz
Subject | Views | Posted |
---|---|---|
2732 | Feb 17, 2017 07:35 AM | |
2732 | Feb 15, 2017 10:13 AM | |
6417 | Feb 15, 2017 09:25 AM |
Activity Feed
- Posted Update on InstallShield Forum. Feb 17, 2017 07:35 AM
- Posted Re: How to run a powershell script from msi before install on InstallShield Forum. Feb 15, 2017 10:13 AM
- Posted How to run a powershell script from msi before install on InstallShield Forum. Feb 15, 2017 09:25 AM
- Tagged How to run a powershell script from msi before install on InstallShield Forum. Feb 15, 2017 09:25 AM
- Tagged How to run a powershell script from msi before install on InstallShield Forum. Feb 15, 2017 09:25 AM
- Tagged How to run a powershell script from msi before install on InstallShield Forum. Feb 15, 2017 09:25 AM