srisdal
Posts: 6
Joined: Tue Apr 22, 2008 1:41 am

Conditional retain registry on uninstall

I am using the Registry features in AI to create my registry tree but a couple things are not clear to me:

1) If the setting already exists, will the default value I have specified overwrite the existing one?

2) If I am performing an upgrade from one release to the next and an uninstall is performed on the installed version, how can I prevent the registry settings from being deleted? I.e. If it is a pure uninstall, then it is fine to remove them, but if it is an upgrade, they should stay.

Thanks,

Scott
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Conditional retain registry on uninstall

Hi,
If the setting already exists, will the default value I have specified overwrite the existing one?
This depends on a lot of things:
- if the target registry entry has the "Never Overwrite" attribute set, then it will not be overwritten
- if it's a string value, then you can append, prepend or replace it (these options can be set in the Edit Registry Entry dialog)
- if it's an expandable string, an integer or binary value and the "Never Overwrite" attribute is not set, then the target registry entry will be overwritten
If it is a pure uninstall, then it is fine to remove them, but if it is an upgrade, they should stay.
I'm afraid that this is not supported by Windows Installer. However, it ca be done by using a custom action. We have a How-To for this which explains what to do.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”