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

OnShutDown does not work

I have a service that must know when the OS shuts down, so it can perform
some cleanup.
I just found that the OnShutDown event never fires when the machine shuts
down!

I did some checking and lots of others are complaining about the same thing.
Has anyone come up with a work around? Is there a hotfix? Anything?

Visual Studio 2005
Windows Server 2003 SP1.
Oct 2 '06 #1
1 1605
Kg
Have you set CanShutdown to true?

I have my OnShutdown event firing, I am trying to test it by sendind a
shutdown event to my service from another app... can anyone help?

"Croco Stimpy" wrote:
I have a service that must know when the OS shuts down, so it can perform
some cleanup.
I just found that the OnShutDown event never fires when the machine shuts
down!

I did some checking and lots of others are complaining about the same thing.
Has anyone come up with a work around? Is there a hotfix? Anything?

Visual Studio 2005
Windows Server 2003 SP1.
Oct 18 '06 #2

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

Similar topics

7
by: Jonas | last post by:
This works fine in Win XP but does not work at all in Win 98. Private WithEvents objIExplorer As InternetExplorer I have to do it like this to get it to work in Win 98 Dim objIExplorer As...
0
by: Paul Lewis` | last post by:
Hello, I am trying to make a service which will shut a hanging process down. Before the OnShutdown function runs, windows asks if I would like to end the task. I cannot modify the hanging...
7
by: knf | last post by:
For a C# windows service, it seems like the best practice is to only implement OnStop(). Is that correct? Do I only need OnShutdown if I need to take different actions when the server is shutdown?...
0
by: TDC | last post by:
At system start I get the OnStart. When the system shuts down, do I *just* get an OnShutdown, or will I get both and OnStop and an OnShutdown? If you only get the OnShutdown, I find it odd that...
2
by: Peter Meinl | last post by:
Restarting Windows seems not to fire the OnShutdown event in the Windows Service. Does not work on Windows XP SP2 and not on Windows 2003 Server SP1. OnStart and OnStop do work fine. Steps...
14
by: Anoop | last post by:
Hi, I am new to this newsgroup and need help in the following questions. 1. I am workin' on a GUI application. Does C# provides Layout Managers the way Java does to design GUI? I know that it...
2
by: lb.weissman | last post by:
Hi, I have a simple service, which I want to stop normally. I added the method OnShutdown, and set the CanShutdown property to true. Still, when I restart the computer my OnShutdown method is...
0
by: Klaus Unterberg | last post by:
Hello, does anyone know, how to make an EventLog in service event OnShutdown? It seems that OnShutdown cannot make an entry to the eventlog.writeentry(). Even when Eventlog is listed in the...
14
by: madankarmukta | last post by:
Hi , I want to commit the chages/ want to do some activity on service's OnShutuDown().But i found that It neven get's called ..when i shut down the system or when i power it off..in Both the cases...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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: 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...

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.