Note: I'm using XP with a Vista theme in most of these pictures.
Step 1: Disable the UAC (Vista Only)
Windows Registry Editor Version 5.00
Click File > Save As, change the Save as type from Text Documents to All Files, and save it as DisableUAC.reg. Then double-click the file you just created and click OK when it asks if you want to merge it into the registry.
Now we're ready to write the shutdown script.
Note: If you need to re-enable the UAC later, just change it to "EnableLUA"=dword:00000001.
Step 2: Writing the Shutdown Script
shutdown.exe -s -t 30 -c "Your PC will shut down in 30 seconds."
Click File > Save As, All types, and name it Shutdown.bat. Double-click it to make sure it works. To cancel it, you can just Start > Run, type "shutdown -a" (without the quotes) and hit enter.
If you're using Vista, the process is almost exactly the same. You just need to replace all the dashes with slashes. So instead, copy and paste this into Notepad:
shutdown.exe /s /t 30 /c "Your PC will shut down in 30 seconds."
The number after -t or /t is how many seconds the message will stay up before Windows shuts down. You can also use whatever message you want to put in after -c or /c, as long as it's in quotes.
Step 3: Setting It to Run at Startup
Now whenever someone logs on to the computer, it will automatically execute the shutdown script. It's easy enough to get rid of by booting into Safe Mode and deleting it from the Startup folder, but most people will have no idea what's going on.