Level 3

Uninstall doesn't remove registry keys for file associations

In my installer I create multiple file association registry entries under HKEY_CLASSES_ROOT. I do this using the action Set Windows Registry -  Multiple Entries. These are not removed when i uninstall my product. The entries i create under HKEY_LOCAL_MACHINE\SOFTWARE\MyProduct are removed on uninstall.

Is there any reason for this? How can I debug uninstall of my product or get uninstall logs?

0 Kudos
4 Replies
Level 6

This seems to be due to the uninstaller's inability to delete
HKEY_CLASSES_ROOT keys when its default(Default) value is set.
If default registry value is not set, the HKEY_ROOT keys added are getting deleted on
uninstall, when Uninstall Options in the "Set Windows Registry - Multiple Entries"
action is set to "Force removal even if values has changed".
The keys with default value set are not deleted but seems false positive
is seen in log. Since file association keys require setting default value,

The workaround will be to :
set Uninstall options to "Do not Uninstall"
and add a script to delete the keys in Sequence->Uninstall phase.
set Uninstall options to "Force removal even if values has changed"
and add a script in Uninstall phase to delete only default values of the keys
and let the uninstaller to remove the keys.

Sequence->Uninstall->Add Action->General->Execute Script/Batch file.

To get Uninstall log, enable logging as belows:
In InstallAnywhere designer->Project-> General Setting-> Enable Logging -> select yes
Select install checkbox & uninstall checkbox
The log file will be found in the <InstallDir>/Logs folder after install/uninstall.

0 Kudos

Since you say this is a false positive. Is this bug likely to be fixed in upcoming InstallAnywhere versions?

0 Kudos

hi @RichRowan ,

Yes, will raise a bug for this to be fixed in next major release.

In InstallAnywhere2021, there is a new action "Associate File Extension-Windows" available for setting File Association.
This action is available in Install->Sequence->Add Action->General.
Suggest using this action instead of using "Set Windows Registry - Multiple Entries" for setting File association.


0 Kudos

Thanks for the feedback. Stuck on IA2020 for now, but I'll look at that when i can upgrade versions.

0 Kudos