View Single Post
  #1  
Old 10-14-2009, 07:17
nino nino is offline
Friend
 
Join Date: Jan 2002
Posts: 58
Rept. Given: 0
Rept. Rcvd 2 Times in 1 Post
Thanks Given: 0
Thanks Rcvd at 1 Time in 1 Post
nino Reputation: 2
Subclass System Shutdown Dialog

Hi,

I use the shutdown.exe utility to shutdown computers at a specified time (as a scheduled task). However sometimes the computer might still be in use and shutdown should be aborted. The system shutdown dialog that opens does not have a cancel button and it is necessary to open a command prompt and abort shutdown using another option of the same utility. I want to subclass this dialog to add a cancel button but trying to use Windows Hooks gives Access Denied. I've tried acquiring the Shutdown privilege and even the Debug privilege (the utility runs under the administrator account) but I always get Access Denied. Is it possible to subclass this dialog?

Note: The Shutdown dialog from most searches over the Internet is the one with the Standby, Stop and Restart buttons. The dialog I'm talking about is the one that shows up by running the shutdown.exe command line utility without the -i option.

Any help...
Reply With Quote