briefcase
briefcase copied to clipboard
MSI: Ability to customize uninstallation steps further
What is the problem or limitation you are having?
- I have an installer that installs a product that writes to
%USERPROFILE%\.foo\bar.txt. When the user uses the product, the filebar.txtcan sometimes be updated. My issue is that when the user uninstalls the product, the contents ofbar.txtneed to be updated. - There is also the case that when the user uses the product, files are created in the installation directory. Since these are created post-installation, the MSI uninstaller is not aware of this and will not remove those files. This results that the uninstaller leaves files behind.
Both of these problems are related to customizing the uninstallation, and according to WiX documentation it should be possible.
Describe the solution you'd like
- I believe the file updating described above could be resolved by allowing the user to specify a
CustomAction, see: https://docs.firegiant.com/wix/schema/wxs/customaction/ I'm not sure if there is any better "best practice" or similar. Any input is appreciated. - For removing additional files during uninstallation, it would be good if the user would be able to specify elements such as
RemoveFolderExwhere I can specify certain files/folders that require removal during the uninstallation process, to target files created post installation. https://docs.firegiant.com/wix/schema/util/removefolderex/
Describe alternatives you've considered
I've thought about solutions via pre_uninstall_script but this seems brittle. Happy to discuss this more in detail.
Additional context
No response