h353655
Posts: 47
Joined: Wed Jun 21, 2017 2:51 pm

Remove registry key on uninstall in merge module

I have a merge module that installs a service, and which removes the service on uninstall if no other installations use it. So far so good.

The service makes a registry key, which must be removed on uninstall (and ONLY on uninstall of the service). So if more than one installer use this merge module, the last installation to be removed will remove the service (works) and the reg. key (doesn't work).

When I try to uninstall, the reg. key will ALWAYS be removed, and not only when the service gets uninstalled.

I tried to look at:
https://www.advancedinstaller.com/user- ... ialog.html
for guidance, but my dialog looks vastly different (see attachment).

How do I make sure, that the key is ONLY removed when the service (the contents of my merge module) is uninstalled?
Attachments
registryoperations.png
registryoperations.png (9.89 KiB) Viewed 2352 times
Liviu
Posts: 1365
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Remove registry key on uninstall in merge module

Hello,

If you do not see the condition option for your registry key on the Operations tab, then you will need to remove this key with a custom action, for example a PowerShell script.

You can create a script to search for your service and, if it is installed, does nothing, otherwise remove the desired registry key.

Hope this helps! Let us know if you have any questions.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”