Is there any Windows XP alternative to Windows Vista's shutdown process which prompts the user whether to continue or cancel shutdown in case some programs contain an unsaved data?
You can do this with some code by handing the SystemEvents.SessionEnding event. This will show a dialog box when you try to logoff or shutdown and ask if you want to cancel the logoff or shutdown.
With the sdk, use the following command:
Here's the code:
If you're willing to do a little registry editing... Start -> Run -> regedit
Make sure AutoEndTasks is 0, and set WaitToKillAppTimeout to 20000 (the default value of 2 seconds). You can set the value higher if you wish. There's also HungAppTimeout (the defalt is 5000), but that applies more for applications which are not responding.
Whenever I do a shutdown on XP, if a program is a busy, it gives me a progress bar and an option to 'End Now' or 'Cancel'.
Clicking 'Cancel' stops the shutdown process. However, whatever it has already shutdown doesn't come back up.
But it does give me time to save what I was working on before re-attempting the shutdown.