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

后端 未结 6 1279
一生所求
一生所求 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:01

    There are multiple problems with yaluna's answer, also property names are case sensitive, Installed is the correct spelling (INSTALLED will not work). The table above should've been this:

    enter image description here

    Also assuming a full repair & uninstall the actual values of properties could be:

    enter image description here

    The WiX Expression Syntax documentation says:

    In these expressions, you can use property names (remember that they are case sensitive).

    The properties are documented at the Windows Installer Guide (e.g. Installed)

    EDIT: Small correction to the first table; evidently "Uninstall" can also happen with just REMOVE being True.

提交回复
热议问题