Automate Startup/Shutdown of PCWednesday, July 09 2008
Where I'm working now they have a policy of shutting down your computer at the end of the day (something about saving a tree). Unfortunately I have a need to leave my PC on so I can access it from home in case of an emergency. But I only need that access until 10 or so at night. So I dug around and found I could indeed do this...
Shutdown There are lots of posts around about how to shutdown Windows automatically. There is a shutdown.exe in Windows but I tried that and had issues with it actually powering off the PC. I didn't really want to run an application so I eventually found PsShutdown.exe a utility from the old SysInternals (now owned by Microsoft). So I simply created a batchfile and call this with the poweroff switch:
Usage: psshutdown [[\computer[,computer[,..] | @file [-u user [-p psswd]]] -s|-r|-h|-d|-k|-a|-l|-o [-f] [-c] [-t nn|h:m] [-n s] [-v nn] [-e [u|p]:xx:yy] [-m "message"]
-k Poweroff the computer (reboot if poweroff is not supported)
And call that script from a scheduled task.
Startup So now when I come in I have to crawl under my desk to power on the PC. I'm far too lazy to do that so I dug around and discovered that most newer computer BIOS support an automatic power on option.
On my Dell it was under "Power Management". I turned it on, and also selected "weekdays only" and a time. Now when I come in - my PC is on and ready to go!