Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: How to create shutdown batch file  (Read 6293 times)

0 Members and 1 Guest are viewing this topic.

Jonathan

  • Guest
How to create shutdown batch file
« on: August 03, 2004, 06:11:54 AM »
Hi!

Iīd like to create a batch file for shutting down 2000/XP computers. It is supposed to be activated through a scheduled task. The problem is: I donīt get it to work. The "shutdown -s" command that works fine in the command prompt results in some kind of loop when I click on the batch file (the shutdown line is being written over and over but nothing happens). Can anybody tell me how to make it work normally? Thanks!

MalikTous

  • Guest
Re: How to create shutdown batch file
« Reply #1 on: August 03, 2004, 08:43:28 AM »
Running a shutdown command from a batch file causes the system to repeatedly try to kill, then re-open the DOS emulator in XP or NT. Create the file as a shortcut link to the shutdown command:

shutdown -s -t xx -c "message"
will shut the system down with a delay of xx and show the message.

shutdown -r -t 01 -f
will restart the system, forcing current running apps to close.

Command list (for WinXP):

-a: Abort shutdown

-c "message": Display message during shutdown

-f: Force currently running applications to shut down

-L: Log off current user

-r: Restart

-s: Shut down system

-t xx: Delay xx seconds before implementing shutdown command

SKy

  • Guest
Re: How to create shutdown batch file
« Reply #2 on: August 03, 2004, 08:43:40 AM »
Hi Jonathan

I don't hav a definative answer, but hope this page helps: http://www.computerhope.com/shutdown.htm

It gives all the shutdown options u can play with.

johnwill

  • Guest
Re: How to create shutdown batch file
« Reply #3 on: August 03, 2004, 09:22:27 AM »
AutoIt http://www.autoitscript.com/autoit3/ has a variety of shutdown and reboot options.

It's truly amazing how many times I've answered questions with the same utility. :D