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

Stop a service programatically

UJ
I have code to start up a service and delete (uninstall) a service. I'm
looking for help on stopping a service. I've noticed that if a service is
running and you delete it, it still is running but has been marked as
disabled. As soon as you stop it, it disappears from the list of services.

Any thoughts/help?

TIA - Jeff.
Oct 18 '05 #1
1 1591
If I understand you correctly, you should just be able to use a
ServiceController to stop it programatically. Here's a walk through
http://msdn.microsoft.com/library/de...onservices.asp
"UJ" <fr**@nowhere.com> wrote in message
news:u9*************@TK2MSFTNGP10.phx.gbl...
I have code to start up a service and delete (uninstall) a service. I'm
looking for help on stopping a service. I've noticed that if a service is
running and you delete it, it still is running but has been marked as
disabled. As soon as you stop it, it disappears from the list of services.

Any thoughts/help?

TIA - Jeff.

Oct 18 '05 #2

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

Similar topics

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...
2
by: Prasad | last post by:
Hi, I am writing a service which takes a long time to stop after the OnStop call is given by the Services Snap-in. The problem is I cannot cut down on the time that it takes to Stop. The Service...
6
by: Jacobus Terhorst | last post by:
Using C#: I tried: ServiceController me = new ServiceController(this.ServiceName); me.Stop(); it raises an exception: Cannot find Service I also tried:
4
by: vickaiser1 | last post by:
I am creating a setup project for an application and need to edit the Metabase.xml file during setup. Does anyone know of a way to stop and then restart services programatically before and after I...
1
by: UJ | last post by:
I have code to start up a service and delete (uninstall) a service. I'm looking for help on stopping a service. I've noticed that if a service is running and you delete it, it still is running but...
2
by: Chris Dunaway | last post by:
I need to be able to start and stop a service on another computer on the network. But I cannot connect to the other computer using my standard user credentials. I have a separate login for that...
7
by: shai | last post by:
I am working at .net 1.1, writing in c#. I have windows service with a COM object. Every unexpected time The COM object throw an error that make my service get stuck (do not respond). I can catch...
4
by: Simon Harvey | last post by:
Hi all, Can anybody tel me how to programatically kill my service when an exception occurs? Whenever something bad happens I'd like to shut it down. Also, is there a way to programatically...
0
by: mattcfisher | last post by:
Hi, I have two windows services running together. One is the main program, and one is an "updater" wrapper for the main. The updater service starts and stops the main one (as in you should never...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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
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
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...

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.