0

I have a custom action which I want to run ONLY when we apply or rollback an update (not Full install(msi), just a patch (msp)) and not when we install or unintall.

I tried the below code but the custom action is invoked only when I an applying and not when rolling back.

<Custom Action="CheckValidation" Sequence="3710">PATCH OR MsiPatchRemovalList</Custom>

Based on the documentation, "PATCH" and "MsiPatchRemovalList" property should contain guid/s depending on the action.

what am I missing here? What are the possible values in the below cases

![1]: https://i.stack.imgur.com/P2i35.png

                    |Full Install   |Full Uninstall |Apply Patch    |Rollback Patch
Installed               
REMOVE              
PATCH               
MsiPatchRemovalList             
Dev
  • 1
  • 2
  • Possible duplicate of [How to add a WiX custom action that happens only on uninstall (via MSI)?](http://stackoverflow.com/questions/320921/how-to-add-a-wix-custom-action-that-happens-only-on-uninstall-via-msi) – Yan Sklyarenko May 18 '17 at 11:16
  • This is different. I am asking when we apply the patch not the full install – Dev May 18 '17 at 13:33

1 Answers1

0

I figured it out... When you Rollback a patch, custom action of the previous patch is called and not of the one you are rolling back.

Case: Base build + Update 1 + Update 2 Now if you rollback to Update 1 then then Custom actions of Update 1 will be called and not of Update 2.

Dev
  • 1
  • 2