I have a custom action that adds/removes a certificate from the Trusted Root Certificates via the Windows Installer. I achieve this by using a CustomAction
It’s possible that the user may not have permissions to add the certificate to TrustedRoots, or they may select “Cancel”, how do I roll back the previous actions, and tell the installer that I’ve cancelled the process?
As it stands now the Windows Installer is always reporting a success response even if it fails.
You should set up your custom action to the a function with return type of ActionResult that way you can return the failure type if the cancel happens or another exception.
NOTE: This is a WIX compatible custom action. I find WIX to allow for more control over the MSI creation.