RichardMc
RichardMc

Reputation: 854

How to stop an .MSI installation Using a wix custom action

I'm making some checks before the installation with a Custom Action. I want it that the installation will not start if these checks fail.

Is there a way to do this gracefully?

Upvotes: 3

Views: 3117

Answers (1)

Syed Ali
Syed Ali

Reputation: 1897

If your checks can not be done using Condition element then in your Custom Action you should return ActionResult.Failure if your checks fail or return ActionResult.Success if the checks pass.

Returning Failure should cause your setup to go in RollBack mode and it will not progress any further. This will work if the Return attribute of CustomAction element is set to check which is the default.

Upvotes: 5

Related Questions