PDA

View Full Version : Timed Shutdown



Storm
01-16-2004, 11:10 AM
is there anyway to shut my computer down at a certain time, or put a countdown shutdown on it (and im not talkin bout a couple of seconds, more like 6 hours)???

ck-uk
01-16-2004, 11:15 AM
I have tweakxp installed so i usualy use that to time a reboot or to powerdown. :)

dgmortal
01-16-2004, 05:51 PM
you can create a batch file and run that as a scheduled task. not sure if thats what youre looking for, but it can do it.

@ECHO OFF
SHUTDOWN -r -f -m \\%computer% -t xx -c "comment"
EXIT
"SHUTDOWN" is the command.
[-r] will reboot after shutdown.
[-f] forces running applications to close.
[-m \\%computer%] is which computer you wish to shutdown. %computer" is the computer name, which you can find in system properties.
[-t xx] is the timeout for the shutdown after the .bat file is run. "xx" is seconds (default is 20 seconds).
[-c "comment"] is the comment diplayed in the shutdown dialog box. you can use no more than 127 characters and the comment must be in quotations.

you can use this instead of having to use another program to do it for you ;) .

[B][O][T]
01-16-2004, 06:11 PM
Nice dg_mortal :)

BOT

99shassan
01-16-2004, 06:54 PM
That code is only good for seconds, can't it be changed to minutes? I don't know how many seconds are in 6 hours :blink: .

dgmortal
01-16-2004, 07:02 PM
Originally posted by 99shassan@16 January 2004 - 12:54
That code is only good for seconds, can't it be changed to minutes? I don't know how many seconds are in 6 hours :blink: .
thats only the timeout for the shutdown, from the time the command is sent until the time the system will actually begin the shutdown. if you want to set it to shutdown in 6 hours, run it as a scheduled task 6 hours from the current time ;) .

EDIT-1: 21600 seconds in 6 hours....but if you use that in the command line, youll have the shutdown dialog box on your screen for 6 hours and you may not be able to do anything since the system might be preparing to shutdown (even if its 6 hours away). im not even sure if the command can handle that many seconds for that switch :unsure: .

EDIT-2: i decided to research this for different versions of windows, and it seems each version has its own way of doing this. i found a page that has details for each one here (http://www.robvanderwoude.com/shutdown.html). but if you test this on any other version of windows (i used this .bat on xp) and it works, please let me know. i believe this particular .bat may only work on nt systems.

B)

DWk
01-17-2004, 02:44 AM
:) There are programs that shutdown at a certain time. Check download.com

primo
01-17-2004, 02:46 AM
I have a really good prog called AutoClose. Just google it to find it. U can set whatever time u want it to and start the timer, and it counts down for ya

xxxSHARExxx
01-17-2004, 06:36 AM
Switch Off (http://yasoft.km.ru/eng/switchoff/) is good

http://yasoft.km.ru/img/shoteng.gif
http://yasoft.km.ru/img/propeng.gif

Rip The Jacker
01-17-2004, 07:27 AM
You can do with what dg_mortal said, great post dg_mortal. :)

Or, if your lazy, get a program called Smart Shutdown (http://www.slawdog.com/products/smartsd/) (Freeware).

You can have your PC shut down/reboot/log off/stand by/hibernate/disconnect from the internet/lock at any specified time. :)

http://www.slawdog.com/products/smartsd/images/screenshot.png

DWk
01-17-2004, 02:04 PM
What I would like is a program that not only shutdowns, restarts, etc. but also (if you chose restart) it runs the programs you were running before the restart (such as K-lite, Bittorrent, Shareaza, etc.)

Any ideas?

TheKiler
01-17-2004, 03:30 PM
Just put those in the startup folder.

dgmortal
01-17-2004, 05:37 PM
Originally posted by DWk@17 January 2004 - 08:04
What I would like is a program that not only shutdowns, restarts, etc. but also (if you chose restart) it runs the programs you were running before the restart (such as K-lite, Bittorrent, Shareaza, etc.)

Any ideas?
another batch file in your startup folder can do that too :rolleyes: .

EDIT:

@ECHO OFF
RASDIAL %"connection"% %username% %password%
CD "path\to\first\program\to\start"
START firstprogram.exe
CD "path\to\second\program"
START secondprogram.exe
EXIT

for RASDIAL, replace %"connection"% with the name of your connection that you wish to dial. if it has spaces or characters other than letters and numbers, be sure to put it in quotes.

you can put this in the startup folder so that it starts with your computer. it will start your network connection and any programs that you wish to start after that. this works on xp, and maybe 2000. i dont think it works on older systems though (but there are ways just like this for those systems).