How to add a WiX custom action that happens only on uninstall (via MSI)?

后端 未结 6 1281
一生所求
一生所求 2020-11-22 06:20

I would like to modify an MSI installer (created through WiX) to delete an entire directory on uninstall.

I understand the RemoveFile and RemoveFo

6条回答
  •  无人及你
    2020-11-22 07:10

    EDIT: Perhaps look at the answer currently immediately below.


    This topic has been a headache for long time. I finally figured it out. There are some solutions online, but none of them really works. And of course there is no documentation. So in the chart below there are several properties that are suggested to use and the values they have for various installation scenarios:

    alt text

    So in my case I wanted a CA that will run only on uninstalls - not upgrades, not repairs or modifies. According to the table above I had to use

    
            (NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")
    

    And it worked!

提交回复
热议问题