- Revenera Community
- 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
- Printer Friendly Page
Abort a Basic MSI installation from a Powershell custom action
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.
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.
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.