cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ajk7c1
Level 3

Components not uninstalling with multiple instances

I have a basic MSI project that (so far) has a component for installing a Windows service and a component for setting a registry key. Installation works fine for any number of instances, but upon uninstallation the registry key and Windows service don't get removed if there are any other instances left installed on the system. So if I install instance 0 and 1 and then uninstall instance 0, the directory the service's executable was placed in will be removed, but the registry key and service will remain, and then everything for instance 1 will be removed correctly when it gets uninstalled. It doesn't matter which order (or how many) the instances are uninstalled; it's only the last one that ever works properly.

Is there something hidden somewhere that keeps things from being uninstalled with multiple instances, or this just a very inconvenient bug? It's not that I don't have a control setting for deleting the Windows service, or have an install-only flag on the registry key -- everything works like it's supposed to when there's only one instance present. Any help would be very appreciated.
Labels (1)
0 Kudos
(5) Replies
ccRubens
Level 5

Hi ajk7c1,

Im starting with IS10 and finally get to this point, install multiple instances of a single Service, but i´m facing the same problem as u,

?Have u find a solution for this, i mean, the problem of uninstalling the multiple instances¿

Tnks in advance
0 Kudos
hidenori
Level 17

Did you check out this thread?
0 Kudos
ccRubens
Level 5

Yea, but it didn´t clear my doubts,

But in this one Thread

, we are almost to the point i need 😉

Maybe u can check and see if u now about it.

Tanks
0 Kudos
ajk7c1
Level 3

I've accepted that this is a limitation of Windows Installer, and made separate components per instance for the things that don't uninstall correctly, as per hidenori's comment in the thread he linked to.
0 Kudos
Christopher_Pai
Level 16

When you install the registry key and service, do you transform their identity?

For example....

HKLM\SOFTWARE\MyCompany\MyProduct-0
HKLM\SOFTWARE\MyCompany\MyProduct-1
HKLM\SOFTWARE\MyCompany\MyProduct-2

MyService-0
MyService-1
MyService-2

If you do, then all should work well. If you don't, then they will become shared components and won't be removed until the last instance comes off.

I know I've done this in previous installs and had no problems.
0 Kudos