WiX installer not removing files on uninstall

后端 未结 2 1675
后悔当初
后悔当初 2021-01-17 17:57

I am telling a wix MSI file to remove files on uninstall, and it\'s simply not registering it.

For the bundle I call the MSI file thusly:



        
2条回答
  •  北海茫月
    2021-01-17 18:29

    Check out this thread; Removing files when uninstalling WiX

    First of all, I hope you are not removing files that are installed by MSI, that would beat the purpose of MSI. It should already do that.

    Secondly, you can try adding empty CreateFolder element to Component(it might be the case of component not registering, if KeyPath element is not included, or Components KeyPath="Yes" is not included).

    Make sure that you use RemoveFolder element. As you can also read from the link, recursion is not supported, so you need to manually delete everything, and make sure that there are no subfolders.

    Ps that's pretty tiring, you can use CustomAction to execute [System64]\cmd.exe with rmdir and include recursive flag there, then schedule it after RemoveFiles, and run it on only on UNISTALL.

提交回复
热议问题