0

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。

1 Answer 1

0

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks a lot for the advice. But I think the registry I mentioned above is deleted by windows automatically, I have no control of that. I believe all I can control is only when to let it happen, am I right?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.