![]() ![]() Set /p choice=Shutdown in how many minutes?ĮDIT - I am revisiting this answer as I have more info to add. Here is a copy of the code I wrote for a simple auto shutdown script, it toggles between cancelling and starting a scheduled shutdown. Much better I think than freaking out a user by scheduling a shutdown. If no shutdown is in progress it will throw an error (Unable to abort the system shutdown because no shutdown was in progress.(1116)). Rather than schedule a shutdown, just try to abort it. ![]() I was too lazy to do this in a batch file, I know it is possible though. ![]() If the scheduled shutdown is more recent than either the most recent cancellation or shutdown then there is one in progress.ġ075 for a canceled scheduled shutdown, under Windows Logs/System One idea is to query the event viewer for the most recent system shutdown, the most recent scheduled shutdown, and the most recent cancellation of a scheduled shutdown. The event viewer can tell you that a shutdown has been scheduled, but not WHEN it was scheduled. I can think of two workarounds for our problem. I have the same problem, I searched all over, but did not find anything useful.Įventually I just started messing around with different things I could think of. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |