I use task scheduler in Windows 8 to run a DOS batch file that I created to shut down the computer whenever a user logs off (disconnect from user session)
You might give that a try and see if it works for you. I suspect it would work on most DOS scripts (batch .bat, command .com etc.,).
Regards
Randy