Automatic shutdown on windows can be done in two ways, :
1. via command line
2. via software
Via command line
to run automatic shutdown via command line, first open cmd
then enter shutdown command
[php] shutdown -s -t xxxinsecond [/php]
for example :
[php] shutdown -s -t 7200 [/php]
this will automatically shutdown your computer 2 hours after the command executed.
in case you have running program that need to be closed before you still can force windows to shutdown by adding -f command
shutdown -f -s -t 7200
for windows xp, there will be pop up message showing countdown timer. if you suddenly want to abort this command just run
[php] shutdown -a [/php]
Via software
you can use small size software like vista shutdown timer. you can download it here
http://www.vistashutdowntimer.toflo.de/Download/Vista-ShutdownTimer1.8.exe