Meisenmann
Posts: 2
Joined: Tue Jun 12, 2018 4:03 pm

Remove registry entry with multiple instances

Tue Jun 12, 2018 4:31 pm

Hey, I am currently creating a setup for our software-product.
The program itself is a windows service which gets deployed through a CustomAction (Powershell-Script). In addition to the default entries "Path" and "Version" I am setting a new registry value "ServiceName" to be recalled on uninstall.
On uninstall ServiceName gets retrieved through a Search which in turn will be used in my other CustomAction to remove the service again.

This works great so far and the registry gets removed when there is a single instance installed. But if there is more than one instance everything but the registry key for that single instance gets removed.

Is there any special behaviour while using multiple instances and registry-keys?

Greetings,
Jonas

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Remove registry entry with multiple instances

Fri Jun 15, 2018 3:55 pm

Hello Jonas and welcome to our forums,

This could happen if the component of the related registry value (ServiceName) has the same GUID set for all the instances of your product.

To avoid this behavior you could generate a different component GUID for each instance of your product.

Here is how you can proceed:

1. go to "Multiple Instances" page and select an instance item
2. in the right pane select the "Components" tab and add the component of your ServiceName registry value; this way a different GUID per this instance will be generated
3. proceed the same for all the instance items from "Multiple Instances" page

Let us know if this helped, otherwise please try to isolate the behavior in a small sample, pattern or test case which we can build and test on our side.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”