# Shutdown using a .BAT file



## iann

Was wondering does anyone know or is it even possible to make a .bat file that will shutdown or restart the computer?
I've tried a few things and searched for it but can't find it.


----------



## LoneWolf071

You mean a batch file? yeah, just do shutdown /help in command line and it will get it all for you.


----------



## iann

no i know that but i mean you make it so that when you click on it the computer shutsdown..


----------



## ranjikvp

here's something that you can try
Create a new txt file somewhere on your system, open it and put in this one line:
(new ActiveXObject("Shell.Application")).ShutdownWindows();
Save and Close the file. Change the extension from [txt]to [js].
You can make a shortcut to that file to make it easy to shut down your system.


----------



## Volt-Schwibe

make a text file.

type the following line into it:

_shutdown -f -s_

save it as shutdown.bat and now you have a batch file that will immediately shut down the pc.

-s is "shutdown" and -f is "force applications to exit"


----------



## C0B01

Volt-Schwibe said:


> make a text file.
> 
> type the following line into it:
> 
> _shutdown -f -s_
> 
> save it as shutdown.bat and now you have a batch file that will immediately shut down the pc.
> 
> -s is "shutdown" and -f is "force applications to exit"




spot on. you can also use as someone said before the "shutdown /help" in cmd and find other parameters to pass to it. like ' -t 5 ' ( shut down after 5 seconds )

remember when you save your text file to use " " marks around the file name, so you dont end up with a file called myshutdownfile.bat.txt


----------



## iann

i did all that and when i click on it it comes up with that command line and just repeats it going down like...







"


----------



## sirbobbinhood

I tried shutdown -t 5 -f -s and it won't work either is there some other command you have to put in before it? or should it just work with just the shutdown?


----------



## HawMan

1. on ur desktop, right click and create a new shortcut. In the shortcut properties, set the target to:

%windir%\System32\Shutdown.exe -s -t 0

for shutdown, or

%windir%\System32\Shutdown.exe -r -t 0

for restart prank.

now rename this shortcut to woteva. like a game name thats original. e.g. planeing like, i made a game and i want u to test it please.

2. (optional, but recommended) Create a new txt file and name it readme.txt and on it write all this bull on some game or woteva. Make sure it goes with the name of the shortcut.

3. zip these two files.

4. Send to ur friends, and when they unzip it and run the shortcut, they will shutdown/restart! trust me.


----------



## sirbobbinhood

sweet thanks now i have one more question i figured out why the first thing wouldn't work it was because i didn't have any privileges on the comp i was on will that shortcut thing still work if i have no privileges? it sounds like it will but i just want to check


----------



## asda653

HawMan said:


> 1. on ur desktop, right click and create a new shortcut. In the shortcut properties, set the target to:
> 
> %windir%\System32\Shutdown.exe -s -t 0
> 
> for shutdown, or
> 
> %windir%\System32\Shutdown.exe -r -t 0
> 
> for restart prank.
> 
> now rename this shortcut to woteva. like a game name thats original. e.g. planeing like, i made a game and i want u to test it please.
> 
> 2. (optional, but recommended) Create a new txt file and name it readme.txt and on it write all this bull on some game or woteva. Make sure it goes with the name of the shortcut.
> 
> 3. zip these two files.
> 
> 4. Send to ur friends, and when they unzip it and run the shortcut, they will shutdown/restart! trust me.


Also, if you're willing to play an even more malicious plan:

*Removed by moderator. This site does not condone tampering with computers that do not belong to you.*


----------



## asda653

asda653 said:


> Also, if you're willing to play an even more malicious plan:
> 
> *Removed by moderator. This site does not condone tampering with computers that do not belong to you.*


Oops, sorry. :normal:


----------

