473,387 Members | 1,440 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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.
Jul 29 '05 #1
3 5397
Hi Robert,
......
I know how to tell the installer project to do something but I don't
know how you shutdown a component like this programatically.


If you want to shut down and remove a component service programmatically,
you can use Component Services Administration (COMAdmin) objects to acheive
it, I suggest you manipulate the COMAdmin objects in a vbs file in order
you can call it in a custom action in your installer program.

For details of how to shut down and remove a component service in a vbs
file, please refer to the following MSDN article and related newsgroup
thread, which has a helpful sample on this issue:

Automating COM+ Administration
http://msdn.microsoft.com/library/de...us/cossdk/html
/f302eb02-2ef5-42ee-a18f-59f7e60b38df.asp

Update a COM+ DLL in Component Services on Win2K
http://groups-beta.google.com/group/...owse_thread/th
read/9cca0e35fa656695/27f2b46be706beaa?lnk=st&q=uninstall+%22component+s ervi
ces%22+vbscript&rnum=1&hl=en#27f2b46be706beaa
Hope this helps!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default...sdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 30 '05 #2
Thanks, I was able to get this to work by overriding the OnBeforeUninstall
event in a custom installer in the project and adding the below:

' Instantiate a COMAdminCatalog object.
Dim objCatalog As COMAdminCatalog = CreateObject("COMAdmin.COMAdminCatalog")

objCatalog.ShutdownApplication("Analyzer Control Publisher Application")

Works great.

Thanks.
R-

""Gary Chang[MSFT]"" wrote:
Hi Robert,
......
I know how to tell the installer project to do something but I don't
know how you shutdown a component like this programatically.


If you want to shut down and remove a component service programmatically,
you can use Component Services Administration (COMAdmin) objects to acheive
it, I suggest you manipulate the COMAdmin objects in a vbs file in order
you can call it in a custom action in your installer program.

For details of how to shut down and remove a component service in a vbs
file, please refer to the following MSDN article and related newsgroup
thread, which has a helpful sample on this issue:

Automating COM+ Administration
http://msdn.microsoft.com/library/de...us/cossdk/html
/f302eb02-2ef5-42ee-a18f-59f7e60b38df.asp

Update a COM+ DLL in Component Services on Win2K
http://groups-beta.google.com/group/...owse_thread/th
read/9cca0e35fa656695/27f2b46be706beaa?lnk=st&q=uninstall+%22component+s ervi
ces%22+vbscript&rnum=1&hl=en#27f2b46be706beaa
Hope this helps!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default...sdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 30 '05 #3
OK, we are glad to help you on this issue:)

Good Luck!
Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default...sdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.

Aug 2 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Stan | last post by:
Here is my scenario: Web server ------------ Framework 1.1 Application proxy for the serviced component Component server ------------------- Framework 1.0
2
by: Ansari | last post by:
hi all, I want to use serviced component in ASP.NET any walkthrough or link to a resource. I have tried a lot but serviced component could be initialized in ASP.NET page. However I can...
0
by: Mihiri | last post by:
Hi, I have created sample .Net Serviced Component and registered it with com+ services as a server application. (windows 2000). In my client application(vb.net) , Com+ objects are disposed...
3
by: Robert | last post by:
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...
0
by: Mark Mims | last post by:
I am having a problem with a .NET serviced component running in MTS trying to call a web service on a remote machine on our internal network. The serviced component is using a domain account for...
4
by: Pete Wittig | last post by:
Hello, I am creating an app using Serviced Components and I am exposing them using the Enterprise Services SOAP service. Here is my problem: I have one COM+ application with several serviced...
0
by: =?Utf-8?B?QkY=?= | last post by:
I am trying to work on Serviced Component in .NET 2.0 environment. I don't see much information about serviced component in .NET 2.0 environment. I worked on serviced component 2 years ago with...
2
by: =?Utf-8?B?QkY=?= | last post by:
I am currently working on moving our business objects into COM+ serviced components. But in the process, there are too many changes such ComVisible and serviced component does not support...
0
by: bharathreddy | last post by:
In .Net COM+ components are referred to as serviced components, Namespace: System.EnterpriseServices; Advantage of Serviced Components: object pooling, database connection pooling,
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.