- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Abort a Basic MSI installation from a Powershell custom action
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Abort a Basic MSI installation from a Powershell custom action
Hi,
This may sound simple but can someone give me a clue on how to abort an installation from a Powershell custom action?
I am using Invoke-SqlCmd to run some SQL statement in try...catch blocks but if it fails the custom action continues.
Return processing is set to "Synchronous (Check exit code)".
Thank you in advance.
Christophe
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Basic MSI projects have built in functionality to abort the installation if there are any SQL script handling errors.
See the screenshot below - clicking on the "Custom" button provides the "Custom error handling" dialog which allows you to enter specific error codes and designate the installer behaviour.
 
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Thanks shunt, but I handle my SQL transaction via a Powershell ps1 script instead of SQL scripts, therefore I was more looking at how to abort the installation from Powershell.
![](/skins/images/8C9D13A71C7F7695F3262372C0172D68/responsive_peak/images/icon_anonymous_message.png)