I work at a school running windows 7.
The shutdown command does not work the same way it used to on XP, due to session isolation there is no countdown timer.
AHK to the rescue, this script is meant to give a 2 minute warning, then shutdown the PC. There should be no way to cancel this. We call it via scheduled task...
#SingleInstance, force initSecs := 120 ; number of seconds to wait #NoTrayIcon Gui, 99:+AlwaysOnTop +Disabled -SysMenu +Owner Gui, 99:Font,s20 bold,Verdana Gui, 99:Add, Text,, Please save and close all work. Gui, 99:Add, Text,, This system will shutdown in Gui, 99:Add, Text, x470 y70 w90 h30 vTX , %initSecs% Gui, 99:Show, NoActivate, WARNING! ; NoActivate avoids deactivating the currently active window. Gui, 99:Flash loop % initSecs-1 { GuiControl,99:,TX,% Frmt(--initSecs) sleep, 1000 } Gui, 99:Destroy Shutdown, 5 return Frmt(secs) { time = 20000101 time += %secs%, seconds FormatTime, mmss, %time%, mm:ss return mmss }