简体   繁体   中英

WIX removefiles and Windows delete registry entry

I'm been wondering during uninstall, how to control the sequence of removefiles and Windows delete registry entry through WIX.

One of my program's registry

HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\S-1-5-18\\Products\\GUID\\Transforms

is deleted before removefiles. If then removefiles failed, the uninstall process abort. But the registry is already deleted, that would be a disaster。

I would recommend adding a new custom action that will be scheduled to run after removefiles during uninstallation and that will clean up the registry as you need. At the same time you will need another custom action that will be scheduled to run during installation and that will create the registry entries. Therefore you would have to remove your registry definitions out of WiX XML.

The custom actions can be written even as shell commands I believe. Otherwise writing C# custom actions is also a good option.

Please don't forget when creating the conditions when to run the custom actions on cases as minor/major upgrades and repair. Fiddling the right conditions might be quite tedious. However all this really depends on your installation scenarios.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM