468,783 Members | 1,621 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,783 developers. It's quick & easy.

Aborting an installation programmatically

K0
Hi everyone I have a question:

I have created a small windows service and runs ok.

I have a problem, tho. I would like to abort uninstalling of the service if
it is currently running, so I thought i could use a servicecontroller for
checkin if it is running and then...

That is the problem, how can i stop uninstalling? Override beforeuninstall?
Override uninstall method???

Can someone post some code sample on how to safely abort an uninstall
process?

Thanx and bye

Jul 21 '05 #1
1 1562
Override the Uninstall mehtod and raise a new InstallException (or
somethign similar).

However, I strongly urge you to consider shutting down the service instead
and continuing uninstallation in the Uninstall method. User's really hate
to not be able to uninstall something!
:-)

---
David Guyer - VBQA Deployment Testing
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: "K0" <K0@K0.com>
Newsgroups: microsoft.public.dotnet.general
Subject: Aborting an installation programmatically
Lines: 18
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <QD**********************@news2.tin.it>
Date: Mon, 22 Sep 2003 07:36:16 GMT
NNTP-Posting-Host: 62.211.20.50
X-Complaints-To: ne********@tin.it
X-Trace: news2.tin.it 1064216176 62.211.20.50 (Mon, 22 Sep 2003 09:36:16 MET DST)NNTP-Posting-Date: Mon, 22 Sep 2003 09:36:16 MET DST
Organization: TIN
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed 00.sul.t-online.de!newsfee
d01.sul.t-online.de!t-online.de!nntp.infostrada.it!news-out.tin.it!news-in.t
in.it!news2.tin.it.POSTED!not-for-mailXref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:109362
X-Tomcat-NG: microsoft.public.dotnet.general

Hi everyone I have a question:

I have created a small windows service and runs ok.

I have a problem, tho. I would like to abort uninstalling of the service if
it is currently running, so I thought i could use a servicecontroller for
checkin if it is running and then...

That is the problem, how can i stop uninstalling? Override beforeuninstall?
Override uninstall method???

Can someone post some code sample on how to safely abort an uninstall
process?

Thanx and bye


Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Richard | last post: by
reply views Thread by Jason | last post: by
2 posts views Thread by John Smith | last post: by
7 posts views Thread by archana | last post: by
16 posts views Thread by eSolTec, Inc. 501(c)(3) | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.