Windows 8 - You get a notification at the System Tray (when the shutdown is issued) that windows is about to shutdown in xxx minutes, and shutdown will happen at xxx time/date. To abort any existing shutdown in progress.īut of course this point is moot if the admin put a timer for 1 second, or immediate shutdown. The user sitting on the PC CAN cancel it, assuming that the user also have admin right on the machine by running: shutdown /a If an admin triggered a remote shutdown (shutdown /m PCName) windows 7 should display a notice saying that the PC is getting instruction to shutdown / restart and give you the countdown. This is for Windows 7 (in corporate environment): When the event is received, the local computer will terminate the script when the event is delivered. There is a WMI Win32_ComputerShutdownEvent event, which occurs when a computer gets shutdown via a remote command. Again, this will only work if you initiated the shutdown locally. Since you have unsaved data in Notepad, Windows will wait and ask if you want to continue the shutdown, giving you the opportunity to cancel. You don't even need a script for this, you could just open notepad and type in some text. This will prevent the machine from shutting down, but it won't prevent other apps and possibly services from being terminated. The script/app could then catch the shutdown even and ask you if you want to quit the script/app, in which you can then cancel. However, there doesn't seem to be any way to cancel the shutdown, unless the shutdown was initiated from the local machine and user. To detect this, you would have to have a script or program running in the background to detect and handle the event. When Windows is about to shut down, it sends a WM_QueryEndSession to all open applications.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |