473,386 Members | 1,644 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,386 software developers and data experts.

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 1707
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Richard | last post by:
I'm using a .net Setup Project to install my .net Windows Application. I want the application installed for "all users". The Installation Folder dialog in the User Interface Editor includes a nice...
0
by: Jason | last post by:
I have a job created on my server which runs a stored procedure. The SP uses a cursor on a recordset to insert rows into a table (via a stored procedure - hence the cursor). It is expected that...
1
by: johnny | last post by:
In a multi-threaded application, say a worker thread makes an asynchronous call and specifies a callback method. But before the callback is executed, the thread is aborted by its creator. What is...
2
by: John Smith | last post by:
Is there any way to find the C:\WINNT\Microsoft.Net\Framework\v1.1.4322 installation directory programmatically vs. hard-coding it? -- Thanx in Advance, atr2000
1
by: K0 | last post by:
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...
7
by: archana | last post by:
Hi all, I am having application in which i am doing asynchronous call.I am using manualresetevent to wait for asynchronous call to complete. I want to stop asynchronous call after certain...
16
by: eSolTec, Inc. 501(c)(3) | last post by:
Thank you in advance for any and all assistance. I'm looking for a way to programmatically retrieve the following if possible: Windows Installation Key or COA from the registry Windows installed...
2
by: Dave | last post by:
I'm working with the Windows installer and need to programmatically get a hold of the Application Folder value (in a custom step). I.e. Application Folder value gets set in the Folder field of the...
2
by: cookspyder | last post by:
I have a simple socket client code that sends the contents of a syslog over to a server when it finds an error. It has been working fine in a while loop of read open socket send line and close...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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.