Windows 7 - MSI uninstall not executing Installer class tagged with [RunInstal
Asked By Nathan Evans
14-Dec-09 10:04 AM

We are developing a MSI installer solution (based on VDPROJ, unfortunately)
that will install an instance of our server application. The installer has
all been designed to support the concept of installing multiple instances.
This means we have written a small utility that takes a 'stub' MSI and then
outputs a configured MSI with a unique Product Code, Product Name etc amongst
other things. The Product Code is updated in both the Property table and
Summary Information stream.
Everything seems to work fine on the install step. Our two test instances,
AcmeCorp and ZurgCorp, are installed side-by-side just fine. Their Windows
Services are all registered and function as expected.
However, we have encountered a very strange issue when it comes to
uninstalling one of these instances. It does not matter which instance we
uninstall first. But which ever one we choose, the uninstall will proceed
very quickly - but so quickly that it actually misses out calling our .NET
Installer subclass (tagged with RunInstaller and being called by the
CustomAction).
The uninstall will be 'successful' and the MSI will be gone from Add/Remove
Programs list. But the Windows Service remains behind because the MSI
uninstaller never run our assembly to remove it!
Now if we go ahead and uninstall the second instance as well, this one will
uninstall just fine including the Windows Service.
So what on earth is going on here?
It smells to me of some form of reference counting. But where? We've
followed the book on this when it comes to making sure the Product Code's are
different. Maybe there is something we are missing to do with Component Id's?
Thanks.
Windows Installer
(1)
Visual Studio
(1)
RunInstaller
(1)
ComponentId
(1)
RunInstal
(1)
AcmeCorp
(1)
ZurgCorp
(1)
SaaS
(1)
Nathan Evans replied to Nathan Evans
I have now run the uninstall process with full debug tracing enabled and it
does indeed appear to be related to the Component Id's.
I can see on the uninstall where the Windows Service is not removed that the
debug trace many entries like this: "Disallowing uninstallation of component:
{long guid here} since another client exists"
So it appears the MSI, despite having a different Product Code and even
Upgrade Code, is actually conflicting with the MSI of the other instance
through the Component Id's.
I wonder what the solution is here, other than regenerating the Component
Id's for each instance?
Wilson, Phil replied to Nathan Evans

Visual Studio's internal component guid generation uses something relating
to the location where it is being installed so it tries to share properly,
and it is doing the right thing as far as the files are concerned because
they are being shared, and you are not in fact side by side at all. Sharing
is not about product codes, it is component guids. So the service file is in
the same location in both products, right? Like many of the other files?
Changing component guids will not help because there will be no ref counting at
all, and the files will be removed if just one of the products is
uninstalled, and I do not think that is what you want to happen.
Why is not the current behavior correct? You have two products installed that
share a bunch of files and a service. When you uninstall one product the
sharing works properly, files stay behind, and the service stays behind
because it is used by the other product. When you uninstall that other
product as well everything cleans up ok.
--
Phil Wilson
The Definitive Guide to Windows Installer
http://www.apress.com/book/view/1590592972
Nathan Evans replied to Wilson, Phil
Phil,
I do not dispute the legitimacy of this behaviour of MSI.
It just is not "fitting" for what we need it to do. We have multiple
customers on a single machine (SaaS basically) and none of these installs
must share any resources. Yes it seems wrong to have lots of duplicate files
on the hard disk but for us this is not a problem. Our server software
amounts to about 30MB... And having each customer's install completely
isolated from each other enables us to perhaps apply a patch to an individual
customer without affecting others.
I have come up with a solution now which basically involves rewritting the
ComponentId values on the Component table.
Thank you for your response, and I do agree with what you are thinking...
that our solution is probably a bit of a "hack".
this application has unexpectedly quit Windows 7 hi im trying to uninstall an application but i get the above error message java.lang.StackOverflowError at java.util.AbstractList$Itr.next(Unknown Source) at com.zerog.ia.installer.util.VariableFinder.a(DashoA10*. . ) at com.zerog.ia.installer.util.VariableManager.a(DashoA10*. . ) at com.zerog.ia.installer.util.VariableManager.a(DashoA10*. . ) at com.zerog.ia.installer.util.VariableManager.a(DashoA10*. . ) at com.zerog.ia installer.util.VariableManager.a(DashoA10*. . ) at com.zerog.ia.installer.util.VariableManager.a(DashoA10*. . ) at com.zerog.ia.installer.util.VariableManager.a(DashoA10*. . ) at com.zerog.ia.installer.util.VariableManager.a(DashoA10*. . ) at com
Troubleshooting Long Boot Time? Windows 7 Just re-imaged my PC last nite. The image was not from that long boot time has gone completely down the tubes. I am getting 1:25 to the Windows Desktop, but at that point there is no connectivity to my NAS box. TeamViewer, OTOH trial-and-error removal of everything optional startup that I can think of? - - Pete Cresswell Windows XP Discussions WINDOWS system32 (1) Office (1) Vista (1) Adobe (1) Backup (1) Disk (1) Bit (1) XP know what: = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = XPBA 1.0 21.1.2012 20:11:21.276 = = = ProcessId -1 C: \ WINDOWS \ system32 \ ntkrnlpa.exe 21.01.2012 20:09:19.703 0 ms { C: \ WINDOWS \ system32 \ ntkrnlpa.exe 21.01.2012 20:09:19.703 C: \ WINDOWS \ system32 \ hal.dll 21.01.2012 20:09:19.703 C WINDOWS \ system32 \ KDCOM.DLL 21.01.2012 20:09:19.703 C: \ WINDOWS \ system32 \ BOOTVID.dll
Why do you still use Windows XP? Windows 7 Give your reasons. Do you plan to upgrade ever? If so, when and why point where this OS will be problematic with new hardware? Personally I am waiting for Windows 8 to release a second service pack. XP sucked when it first came out until did not work, it had to enabled then disabled to be disabled for real. Sigh. . . Windows XP Discussions Windows XP (1) Windows Embedded (1) Windows Server (1) Microsoft Word (1) Windows Media (1) PowerPoint (1) Smart Card (1) Outlook 2010 (1) | Give your reasons. | | Do you
cannot access WINDOWS UPDATE successfully . . . keeps soliciting New!Get Microsoft Update today! Windows 7 I am running Windows XP SP3 Home Edition on 1 of 4 PC's and it is been updated through early April 2011. Prior to this, accessing Windows Updates (via http: / / www.update.microsoft.com / windowsupdate / v6 / default.aspx?ln = en-us) worked to understand why. Recently, around the middle of April 2011, each time I went to Windows Update, the page initially appears and I can briefly see the 2 buttons (of which my PC running XP SP3 Home Edition because my other 3 PC's, all running Windows XP SP3 Professional with Internet Explorer 6 are having no problems with Windows Update. This is also why I prefer not upgrading to Internet Explorer 8 on my Edition. Because my 3 PC's running XP Professional XP3 are not having problems accessing Windows Update with Internet Explorer 6, it seem reasonable to conclude that this is an XP
Import Calendar from Outlook 2003, or from csv file? Windows 7 The title says it all - is this possible? Windows Live Mail Desktop Discussions Windows XP (1) Microsoft Exchange (1) Windows Mail Windows Live Mail (1) Outlook 2003 (1) Windows 7 (1) Office (1) Vista (1 Windows Live Photo Gallery (1) I do not believe that there is any option to import main calendar to the Hotmail Calendar in Outlook and these will sync to the server. Windows Live Mail will then sync these back down. Do note that this newsgroup exists only