answersLogoWhite

0


Best Answer

copy this to notepad:

shutdown -s -t "shutdown time"

and save as shutdown.bat

An example would be:

shutdown -s -t 10

The above example will shutdown the computer in 10 seconds. The number 10 in the example is in seconds and can be changed to any number of seconds you want a delay for even 0 (zero). If a zero is used, there will be no delay and the system will shutdown immediately. Alternatively, if you want to restart instead, you can change the -s for -r. The -t can be omitted, but if it is, the default time is 30 seconds.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

shutdown -s

You can type shutdown /? in cmd for more info

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you write batch file to shut down windows xp?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Can I have a running batch file continue in another batch file but have it running in the same spot as it was before just moving it in windows 7?

You can have a running batch file continue in another batch file but have it running in the same spot as it was before moving in Windows 7 if it is configured properly. Batch files are designed to perform simple operations based on user input.


Is there any batch file editor to create batch file without learning syntax?

You can't download a program that makes a batch file to do what you want to do. You will need to legally learn about hacking, and then write the file yourself.


How does one write a batch file?

There are a number of steps one must take to write a batch file, which is an executable file that can automate frequently performed tasks on a computer. Batch files can be written in Notepad, saved, and then once the file extension is changed to .bat, can be double clicked to execute.


Is a bat file a virus?

http://en.wikipedia.org/wiki/BAT_file no its a batch file used by dos and windows


What is the batch file used by Windows 98 to control the boot process?

Autoexec.batAutoexec.batAutoexec.bat


What is the full form of BAT?

if by bat you made the .bat file extension then the full form of bat is batch. it is a file that is created with batch script, the windows command line.


How do you get a full screen batch file on windows vista?

You can't make the batch file automatically open up in fullscreen mode, but you can do this: @echo off mode 800 "Commands here" This will open the batch file in a rather larger-than-normal window, but it will not be in fullscreen, the user of the batch file must click the maximize button to make it fullscreen.


Where can on learn batch file scripting techniques?

Batch file scripting techniques can be learned from various sources. For example one can learn scripting techniques from books such as 'Windows Batch File Programming'. One can also learn scripting techniques from websites such as Scribd, WinBatch, and CodeProject.


What files are used by MS-DOS to configure a computer?

CONFIG.SYS and AUTOEXEC.BATThe files are CONFIG.SYS and AUTOEXEC.BAT.


How to create a batch file and impliment it?

To create a batch file open notepad, textedit, or whatever editor you wish to use. Once open write your program, check for errors, and "make simple text." Save this program as whateveryouwant.bat. Open the file and the batch file will execute.


What does a bat document mean?

"Bat" is short for "batch" which is a type of scripting language for computers. They're basically just text files which you can write to do simple tasks for you. To read one (on Windows) right-click the file, then choose "open with" and select Notepad. Further reading: http://en.wikipedia.org/wiki/.bat A batch file is a text file that contains a sequence of commands for a computer operating system. It's called a batch file because it batches (bundles or packages) into a single file a set of commands that would otherwise have to be presented to the system interactively from a keyboard one at a time. A batch file is usually created for command sequences for which a user has a repeated need. Commonly needed batch files are often delivered as part of an operating system. You initiate the sequence of commands in the batch file by simply entering the name of the batch file on a command line.


What does a document mean?

"Bat" is short for "batch" which is a type of scripting language for computers. They're basically just text files which you can write to do simple tasks for you. To read one (on Windows) right-click the file, then choose "open with" and select Notepad. Further reading: http://en.wikipedia.org/wiki/.bat A batch file is a text file that contains a sequence of commands for a computer operating system. It's called a batch file because it batches (bundles or packages) into a single file a set of commands that would otherwise have to be presented to the system interactively from a keyboard one at a time. A batch file is usually created for command sequences for which a user has a repeated need. Commonly needed batch files are often delivered as part of an operating system. You initiate the sequence of commands in the batch file by simply entering the name of the batch file on a command line.