Making a btach file.(Shutdown my computer)

Discussion in 'Software' started by carnevil09, Feb 13, 2006.

  1. carnevil09

    carnevil09 Private E-2

    Hi. I am extremely new to batch making. Infact I havn't made one thing yet. Anyway I was wondering if it is possible to make a batch file that will SHUT Down my computer at 12:00 at night.

    Since I do not know how to do this, can someone make this for me. I would expect it do be pretty simple if it is possible.

    Also, how would I get this to work. All I really know is that a batch file is a text document. What wouldI have to do after I get it for it work.

    Windows Home Edition - Service Pack 2
    Time Zone - Arizona (For the time I need it to shut down)

    -Thank you so much
     
  2. dedub

    dedub Corporal

    @echo
    shutdown -s

    paste those two lines in notepad and save it as off.bat or whatever, as long as it ends in .bat dont call it shutdown.bat!
    Put that in either the windows folder or in windows/system32, either one will work.
    Then you have two options, there is a command in XP's version of dos called AT
    thats the letters AT

    The AT command schedules commands and programs to run on a computer at
    a specified time and date. The Schedule service must be running to use
    the AT command.

    AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]]
    AT [\\computername] time [/INTERACTIVE]
    [ /EVERY:date[,...] | /NEXT:date[,...]] "command"

    \\computername Specifies a remote computer. Commands are scheduled on the
    local computer if this parameter is omitted.
    id Is an identification number assigned to a scheduled
    command.
    /delete Cancels a scheduled command. If id is omitted, all the
    scheduled commands on the computer are canceled.
    /yes Used with cancel all jobs command when no further
    confirmation is desired.
    time Specifies the time when command is to run.
    /interactive Allows the job to interact with the desktop of the user
    who is logged on at the time the job runs.
    /every:date[,...] Runs the command on each specified day(s) of the week or
    month. If date is omitted, the current day of the month
    is assumed.
    /next:date[,...] Runs the specified command on the next occurrence of the
    day (for example, next Thursday). If date is omitted, the
    current day of the month is assumed.
    "command" Is the Windows NT command, or batch program to be run.

    this is the help file. in a cmd prompt you would type something like this
    AT 2359 off.bat

    The other option is use good ol windows task manager and go through the wizard and point it to the batch and set the time. too easy

    you can also change the shutdown -s to shutdown -r and it will restart instead
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds