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