Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

shutting down w/o confirmation

Status
Not open for further replies.

lovewindoze

Technical User
Jan 16, 2003
36
US
Is there a way for me to schedule a task to shutdown my computer at a specific time.
And can I do it without having to click the button on the dialog box to confirm that I really do want to shut down.
 
i believe the command is

shutdown -s -c

-c which forces closure of all apps

-s = shutdown



~Shmoes

 
you can type

at command prompt (start > run > cmd>

shutdown -?

for a list of options


~Shmoes

 
The above post is slightly wrong:

The actual command is:
shutdown -s -f

However, I would recommend using the improved shutdown utility from the following site:
This utility allows you to schedule hibernations - something that the XP shutdown command cannot do. There are user instructions on the site.

Create a shortcut with the appropriate switches and use Scheduled Tasks (in Control Panel) or schtasks at the command prompt to automate your shutdown.
 
I have tried using the builtin shutdown.exe and the shutdown utility at the above URL. Both work if I go to RUN CMD and then type in the location and commands.

But I can't seem to get it to work as a Scheduled Task.
I went through these instructions
step-by-step and still couldn't get it to do anything when the task was scheduled to execute.

This is what I have in the RUN field on the Task tab of my scheduled task:
C:\WINDOWS\SYSTEM32\SHUTDOWN.EXE -S -F
I also tried:
C:\WINDOWS\SYSTEM32\SHUTDOWN.EXE -F -S

any idea why this won't work as a scheduled task even though it works manually using Start -> Run
 

Try the following:

1. Create a new shorcut on your desktop.
2. In the 'Type the location' box, enter 'C:\WINDOWS\SYSTEM32\SHUTDOWN.EXE -S -F' without the quotes.
3. Click Next and give the shortcut a name. i.e. Shutdown.
4. Go to Control Panel > Scheduled Tasks.
5. Add a new Scheduled Task and browse to the shortcut on the desktop.
6. Enter all the necessary details such as the frequency, time and password for the task. Click Finish.
7. Right click the shutdown scheduled task. On the Task tab in the Run box, ensure -S -F is located after shutdown.exe.
8. Test the scheduled task.

Let me know how you get on.
 
Excellent outonalimb, the shortcut->task worked beautifully.
thank you!
for the life of me though, I don't understand why that method worked and my original task of C:\WINDOWS\SYSTEM32\SHUTDOWN.EXE -S -F
didn't work.
thanks again.
 
also, if you right click on the shortcut, and click on the shortcut tab, you can assign a keyboard combination to execute the shutdown as well :)
I use alt-ctrl-end
and for the actual command,I use:
%windir%\system32\SHUTDOWN.exe -s -t 30 -c "Computer shutting down at 9:30pm as scheduled by the administrator. Please save any open work immediately.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top