PDA

View Full Version : Service can not be removed when two installer using same merger module



jimmyliu
11-14-2005, 12:10 PM
Hi, there,
I have a core application used by many products, so I created a merge module for this application, in this merge module, I created a service and have some registry values, of course, service name and registry key value is an property, so they will be different for different product. Then in my main product installer, I use this merge module, and create installer msi. Now I created 2 installer using this merge module, I found if I only install one of my installer, it is ok, everything works fine, but if I install both in my machine, installation is ok, but uninstall one will leave service and reigstry key unremoved, uninstall second will remove its service and registry key. I already set all components in my merge module as "No" share, any comments or solutions for this?

Christopher Painter
11-14-2005, 12:26 PM
Components will reference count themselves regardless of the Shared property. Why do you not like this behavior? What you describe as happening sounds very desirable to me.

jimmyliu
11-14-2005, 12:54 PM
I should describe more clear. For example, I install product1 in dir1 created service1, then I install product2 in dir2 created service2, these two products are stand alone product using same merge module. I uninstall product1, service1 is remained, all product1 binaries are removed. After that I uninstall product2, service2 and dir2 are all removed. From these steps, you can see service1 is left over, it is supposed to remove during uninstall product1, otherwise reinstall product1 will cause problem. If component has reference count, why binaries are being removed, but leave service remained? Any help in my case will be appreciated. Thanks.

Hamilton-Scott
11-14-2005, 03:08 PM
Jimmy,

You might have shagged your machine somewhere. The service may be dependent on a file which if removed should bring the service down and that's the behaviour I get with mine and I install 7 services and they remove cleanly. I can't remember the exact registry but I think it's somewhere in the CurrentVersion key and removing it pulls the entry out of the services control panel. You could search for the name of the service or its description. Ihad some **** left in the registry (a day in the life of a developer!) which caused the very same problem that you have for me. First up, is search and destroy any registry remnant that fingers your service and remove it.

Or failing that, have you tried installing/uninstalling on a clean machine?

Possibly check the service settings in the feature to stop the service when uninstalling?

jimmyliu
11-14-2005, 03:41 PM
Thanks for the reply, I do try installing/uninstalling on a clean machine, install/uninstall any one of product no problem at all, the problem only happen when install them both then uninstall. First uninstall can not remove service, but second one yes. It is possible somewhere merge module set some count and first uninstall treat something should be left over so service is not removed, but I just can not find where to look at, any more comments or suggestions?