How to Stop Serviced Component so Uninstall removes it completely



We have several serviced components written in .NET 1.1. Using Visual
Studio, we have an installer project that creates an installer for them.

The components are installed properly into the GAC and show in the Component
Services control panel.

The issue is when we uninstall or want to upgrade the components. What we
have found is if there are live instances pooled and running (which is always
the case as we want them to be ready for calls by a web application), then if
we just uninstall or try an upgrade install, the component is not removed
from the Component Services list. After an upgrade we would then see two
versions registered, the old one and the new one where the old one won't of
course work because the files have been removed. This causes issues with the
calling web application which seems to get confused.

It's also confusing to look at at the least.

However, if we stop the component first by going to the Component services
control panel and right clicking Shutdown on it. Then when we do an
uninstall or an upgrade install, the old version is removed from the
Component Services list and the new one added and everything is fine.

So my question is....is there a way to put a custom action in the Visual
Studio installer so that during it's "before uninstall" function it can
shutdown the component so we don't have to do it manually.

I know how to tell the installer project to do something but I don't know
how you shutdown a component like this programatically.
.



Relevant Pages

  • Re: Windows XP upgrade...virus?
    ... If I could just get Norton uninstalled! ... Needed to uninstall Easy CD Creator, ... > uninstall all of Norton first, and all other virus and system-like software. ... >> When I try to install most everything, I get a Windows Installer ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Removingr UNWISE.EXE from my XP Home Edition.
    ... Microsoft CDO for Windows 2000. ... Click "uninstall Ad-Aware" in the Lavasoft folder of your start menu ... Then you'll have to post here and ask, "How do I uninstall Ad-Aware SE ... Inno Setup is a free installer for Windows programs. ...
    (microsoft.public.windowsxp.perform_maintain)
  • WSUS REINSTALL FAILED
    ... Creating performance counter category WSUS: ... categoryName, String categoryHelp, CounterCreationDataCollection counterData) ... The uninstall is beginning. ... System.Diagnostics.PerformanceCounterInstaller installer. ...
    (microsoft.public.windowsupdate)
  • Re: Error Installing WSUS::: Cannot create Performance Category
    ... >> categoryName, String categoryHelp, CounterCreationDataCollection counterData, ... >> categoryName, String categoryHelp, CounterCreationDataCollection counterData) ... >> System.Diagnostics.PerformanceCounterInstaller installer. ... >> the uninstall will continue. ...
    (microsoft.public.windows.server.sbs)
  • Re: Removingr UNWISE.EXE from my XP Home Edition.
    ... Click "uninstall Ad-Aware" in the Lavasoft folder of your start menu ... Then you'll have to post here and ask, "How do I uninstall Ad-Aware SE ... Setup is a free installer for Windows programs. ... *.msi files are Windows Installer Files or Windows Installer packages. ...
    (microsoft.public.windowsxp.perform_maintain)