Black Cat Forums   Alien Swarm - Steampowered Forums
Alien Swarm 2K4 - ThieveryUT
Black Cat Games - TTLG Forums

Go Back   Black Cat Forums > Community Forums > Troubleshooting & Technical Help

Reply
 
Thread Tools
Old 4th Jul 2009, 06:14 PM   #1
Ki!ler-Mk1
Member
 
Ki!ler-Mk1's Avatar
 
Registered: Apr 2005
Location: Boston, England
Posts: 2,013
Scheduled Task: Shut down

Hi, does anyone know how to schedule a task to shut down a windows xp machine correctly(eg the same as if you press "windows"+"U"+"U"), and weather this would be done by targetting a batch file using the scheduled task system or some other program built into windows?

I have found an executable located in the windows folder "shutdown.exe". but im not prepared to run it unless it does that infact.

EDIT: Where has the delete thread button gone?

Ah what the hell, gona try it tonight, see what happens.
__________________
Alien Swarm Map List
Ki!ler-Mk1 is offline   Reply With Quote
Old 4th Jul 2009, 06:49 PM   #2
westy
Member
 
westy's Avatar
 
Registered: Aug 2006
Location: USA
Posts: 444
Code:
shutdown -s -t 99
Shuts the computer in 99 seconds

Code:
shutdown -a
Aborts a shutdown.

Use /? for full syntax.
__________________
Kept an xmas avatar for 3 year(s).
westy is offline   Reply With Quote
Old 4th Jul 2009, 07:29 PM   #3
Ki!ler-Mk1
Member
 
Ki!ler-Mk1's Avatar
 
Registered: Apr 2005
Location: Boston, England
Posts: 2,013
Is that for a batch file or to type in cmd.exe eg 3600 seconds for 1 hour?

Also, i set a task for 4 am today, but while i was afk for the last 70 minutes my pc restarted, could this have been related.
__________________
Alien Swarm Map List
Ki!ler-Mk1 is offline   Reply With Quote
Old 5th Jul 2009, 01:42 AM   #4
Ki!ler-Mk1
Member
 
Ki!ler-Mk1's Avatar
 
Registered: Apr 2005
Location: Boston, England
Posts: 2,013
Well, shutdown.exe doesnt work.
__________________
Alien Swarm Map List
Ki!ler-Mk1 is offline   Reply With Quote
Old 5th Jul 2009, 03:21 AM   #5
westy
Member
 
westy's Avatar
 
Registered: Aug 2006
Location: USA
Posts: 444
It should work in a batch or in a command window, windows run etc

The time is only the number of seconds the dialog appears on the screen. And it doesn't work if it's more than 99 seconds.

You can put it in a batch file or run it on it's own.

Putting it in scheduled tasks as "shutdown -s -t 99" on it's own works.
__________________
Kept an xmas avatar for 3 year(s).
westy is offline   Reply With Quote
Old 5th Jul 2009, 03:40 AM   #6
FixXxeR
Member
 
FixXxeR's Avatar
 
Registered: Jan 2003
Location: UK, Manchester
Posts: 4,051
Batch files are win!
__________________
-TuF- Emptying clan servers of their own clan members since 2010
- Agg moderator campaign supporter 2011
- #2 of 3 LANers of the Apocalypse!
FixXxeR is offline   Reply With Quote
Old 5th Jul 2009, 08:06 AM   #7
Machine
Member
 
Machine's Avatar
 
Registered: Jan 2003
Location: TuF Forums
Posts: 5,829
Shutdown.exe works. I use it after jkdefrag.
__________________
~TuF~
Machine is offline   Reply With Quote
Old 5th Jul 2009, 03:36 PM   #8
Moses2k
Member
 
Moses2k's Avatar
 
Registered: Oct 2004
Location: Was actually here before Fuzz
Posts: 5,674
I hearby rename this thread:

Scheduled Task: Alien Swarm
Moses2k is offline   Reply With Quote
Old 6th Jul 2009, 12:06 AM   #9
Salvage
Member
 
Registered: Jan 2003
Location: In the conservatory with the lead pipe.
Posts: 1,374
 Originally Posted by westy: ( link to post ) 
It should work in a batch or in a command window, windows run etc

The time is only the number of seconds the dialog appears on the screen. And it doesn't work if it's more than 99 seconds.

You can put it in a batch file or run it on it's own.

Putting it in scheduled tasks as "shutdown -s -t 99" on it's own works.
If you want more than 99 seconds use the ping workaround on an earlier line of a batch:

PING 1.1.1.1 -n 1 -w 5000 > NUL would be 5 seconds(I use this one all the time)
PING 1.1.1.1 -n 1 -w 3600000 > NUL would be one hour(testing to see if it works right now - edit: it does)
__________________
Hippopotomonstrosesquippedaliophobia, n. See also Irony.

Last edited by Salvage; 6th Jul 2009 at 01:35 AM.
Salvage is offline   Reply With Quote
Old 6th Jul 2009, 02:44 AM   #10
Machine
Member
 
Machine's Avatar
 
Registered: Jan 2003
Location: TuF Forums
Posts: 5,829
n1 salvage, decent little trick that!
__________________
~TuF~
Machine is offline   Reply With Quote
Old 6th Jul 2009, 12:40 PM   #11
Baz
Member
 
Baz's Avatar
 
Registered: Jan 2005
Location: 0xbaadf00d
Posts: 3,094
An even better trick was the magical disappearance of sleep. Another wonderful bit of magic by the Magnifico Microsofii.

"Guys, lets get rid of sleep.exe, it's causing too much bloat"
__________________
..it's safer here.
Baz is offline   Reply With Quote
Old 6th Jul 2009, 12:50 PM   #12
Machine
Member
 
Machine's Avatar
 
Registered: Jan 2003
Location: TuF Forums
Posts: 5,829
Sleep is in the windows 2003 resource kit. Seperate download from MicroCrap.

__________________
~TuF~
Machine is offline   Reply With Quote
Old 12th Jul 2009, 05:38 PM   #13
Ki!ler-Mk1
Member
 
Ki!ler-Mk1's Avatar
 
Registered: Apr 2005
Location: Boston, England
Posts: 2,013
Can anyone give me all the [code] for for a batch file that if run by the task schedular will turn the pc off, in a way that doesnt involve restarting?
__________________
Alien Swarm Map List
Ki!ler-Mk1 is offline   Reply With Quote
Old 12th Jul 2009, 10:57 PM   #14
westy
Member
 
westy's Avatar
 
Registered: Aug 2006
Location: USA
Posts: 444


Down.bat
Code:
shutdown -s -t 99
Or if you don't want the timer, take the "-t 99" out.

If you computer IS restarting instead of shutting down it's because you have problems with the power management setup, or your power supply, or your installation of windows is borked.

See: http://www.aumha.org/win5/a/shtdwnxp.php

Especially...
 Quote:
Most Win XP shutdown problems reported thus far have been that it reboots when shutdown is attempted. This may be a global symptom emerging from several distinct causes, because, by default, XP executes an automatic restart in the event of a system failure. Therefore, more or less anything compromising the operating system during the shutdown process could force this reboot.

Disabling the “restart on system failure” feature may permit the exact cause to be isolated: Right-click on My Computer, click Properties, click the Advanced tab. Under “Startup & Recovery,” click Settings. Under “System Failure,” uncheck the box in front of “Automatically restart.”
__________________
Kept an xmas avatar for 3 year(s).
westy is offline   Reply With Quote
Old 12th Jul 2009, 11:51 PM   #15
Moses2k
Member
 
Moses2k's Avatar
 
Registered: Oct 2004
Location: Was actually here before Fuzz
Posts: 5,674
I second Westy's comment; it's the advice I usually give.
Moses2k is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Eidos is recruiting. Now that Thief 4 has been announced & Nightblade shut down... Subjective Effect Community Chat 17 17th May 2009 02:46 PM
Website scheduled updating (kinda technical) Chainsaws Troubleshooting & Technical Help 4 1st Nov 2005 01:51 PM
My Computer Wont Shut Down (really) onecrazymoho Troubleshooting & Technical Help 34 22nd Sep 2004 10:18 AM


All times are GMT -5. The time now is 01:22 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, vBulletin Solutions, Inc.