473,405 Members | 2,300 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,405 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 1709
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
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.