473,734 Members | 2,511 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Starting / Stopping a Windows Service

Stu
Hi,

I have been asked to write a little app the restarts a windows service under
certain conditions. It is not a service written in .Net?

thanks in advance,

Stu
Nov 20 '05 #1
1 1019
Take a look at the ServiceControll er component.

"Stu" <s.****@cergis. com> wrote in message
news:Oq******** ******@tk2msftn gp13.phx.gbl...
Hi,

I have been asked to write a little app the restarts a windows service under certain conditions. It is not a service written in .Net?

thanks in advance,

Stu

Nov 20 '05 #2

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

Similar topics

5
2615
by: CG | last post by:
Hi I have developed a Windows Service When I try to start the Service it tells me that it cannot start as there may not be any work to do When I comment out below line of code in my OnStart event.... objEventLog.EnableRaisingEvents = Tru ....It starts fin I have the same issue when stopping the service because of below line of code in my OnStop even
0
1101
by: Rafal Zurkowski | last post by:
Hello everybody, Maybe my question is very simple but I can't find answer for it. And without it I can't go on. I have installed SQL 2000 Personal edition on Windows 98. All the setup process ran smoothly. The troubles started later. I started SQL service form SQL Service Manager. The starting process was very long. About 3 minutes. The machine is not very fast so it's possible. AMD-K6-III 450MHz and 256MB RAM.Then I started Enterprise...
1
1532
by: Joel Zinn | last post by:
I have a windows service that I am developing in VB.Net and during it start up process, I am checking various things. If there is an error encountered while doing these checks, I would like to halt the startup process (and stop the service) and then also like to disable the service, if possible. I have tried using the ServiceController class to gain access to the service, but when I issue a Stop method, it appears to work, but the...
0
2811
by: tshad | last post by:
I have a Windows Service I created that just sets a timer and writes to EventLog every 10 seconds. It installed fine and it actually starts. But it says it doesn't. The progress bar shows the progress fine until it hits about halfway. It then stops there for about 4 or 5 seconds then goes a little farther. I then get a message: Could not start the MyService Service on Local Computer. Error 1053: The service did not respond to the...
7
10069
by: Gene | last post by:
I have a Windows Service (VB.NET) that runs 24/7. It queries a Web service 5 to 10 times per hour. About 2 or 3 times a month, it fails. The log indicates that it sends the request to the Web service but there is no return from the service. Stopping and restarting the Windows service cures the problem. Our desire is to cure the problem with appropriate error handling but failing that, is there an easy way to automatically stop and...
3
1693
by: Johnny Fugazzi | last post by:
OK, I created my handy little windows service and created an MSI installer using the Deployment tool in VS.net with Custom Actions according to the msdn help. Worked great, with one little hitch. The Service is installed and marked for Automatic startup, but the service is not starting with windows. If i reboot and then check the services, the service shows as Stopped, but still marked Automatic. Any idea?
1
1543
by: juleni | last post by:
Hello, is there a possibility starting or stopping postgres database and creating database instance by JAVA? Is there some API available for this? If yes, can you please write some example, how to do it? Thank you in advance, with best regards,
5
4490
by: Benzi Eilon | last post by:
I have written a C# application which should run as a Windows Service. I must avoid having multiple instances of the application on one machine so I inserted the following code at the beginning of the Main() function: // if this is not the first instance of this application, exit // immediately. Allow only one instance in the system if (Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length > 1)
3
4136
by: Cenarius | last post by:
Hi, I need some help, i don't know much about programming other than executing them get getting them from scripting sites. My program is it won't start a service if the startup type is Disabled. it will try and stop a service that is disabled and will display msg "Error stopping service." if i run script on a service that is already running, it stop then start the service and restarts it again. Thanks whoever has the time to help me. Option...
10
7537
by: archana | last post by:
Hi all, I am having one windows service which is updating to database. On 'Onstop i want to wait till current updation complete. How will i do this? Because if i write some lengthy code on onstop it fails to stop and status remain 'stopping' Later i can't do anything on that service even i can't uninstall that service.
0
8946
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8776
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9310
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9182
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6735
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6031
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.