1) First create text file and call it "auto shutdown.bat"

2) Example code:

@echo off
shutdown /s /t 5400
The /t xxxx switch xxxx is the time delay in seconds.

So for 1 hour and 30 minuets, xxxx would be 5400.

That it now you can have your computer shut at a given time. You can also execute that command from a CMD window.

To cancel the shutdown before the time elapses, execute this command in a CMD window:

shutdown /a