![]() |
|
|
|
#1
|
|||
|
|||
|
Git,
Thanks for your reply. This is taken from the MSDN documentation regarding ExitWindowsEx: The function is designed to stop all processes in the caller's logon session. Therefore, if you are not the interactive user, the function can succeed without actually shutting down the computer. If you are not the interactive user, use the InitiateSystemShutdown or InitiateSystemShutdownEx function. As you can see, it is better to use InitiateSystemShutdown. However this displays the System Shutdown dialog I can't subclass. In fact, reversing the shutdown.exe utility you can see that it uses this latter API. But what you propose is valid. I can write my own shutdown utility with my own Dialog and call the same API shutdown does. However reversing shutdown will take longer than just subclassing the Dialog. So, unless this Dialog can't be subclassed y prefer not to reverse. |
|
#2
|
|||
|
|||
|
You can use SHUTDOWN replacement by sysinternals.com: look for PSSHUTDOWN.
The option '-c' adds the "Cancel" button to the shutdown dialog box. Best regards, bilbo |
|
#3
|
|||
|
|||
|
Hey Bilbo, this is exactly what I needed. I already created a little proggie that allows to cancel shutdown from the tray and it works fine but I might be curious and look inside this utility to see how it bypasses the System Shutdown dialog.
Thanks a lot!! ![]()
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Skillfeed everything for free // site shutdown | Spiderz_Soft | General Discussion | 2 | 09-22-2015 01:06 |