Shutdown your friend’s computer using a batch file

Posted by MUKESH KUMAR on 1 Jul 2011


What are batch files:
Batch files are files that allow MS-DOS and Microsoft Windows users to create a lists of commands and/or programs to run once the batch file has been executed. For example, a batch file could be used to run frequently run commands, deleting a series of files, moving files, etc. A simple batch file does not require any special programming skills and can be done by users who only know DOS commands.
A good example of a batch file for someone who is more familiar with Windows or the MacOS is to think of a batch file as a shortcut in Windows or an icon on the MacOS. Much like a shortcut, batch files could be used to run one or more commands and/or programs through the command line.
Another example of a very well known batch file is the autoexec.bat, which is a simple boot file loaded each time the computer is loaded on MS-DOS and early Windows computers. This batch file contained all the necessary commands and programs used to run MS-DOS and Windows each time the computer booted.

How to use batch file to shut down your friends comp:
The command to shut down the computer from command prompt is “shutdown –s –t XXXX” where X is the time in seconds after which the computer shuts down. To turn off your friends comp just create a batch file with this command and send it to your friend via gtalk or yahoo messenger. When he opens the file then shut down process starts.
How to create batch files:
Creating batch files is very easy just open the note pad and type in the commands you want to be executed (each in a new line) and save it as “filename.bat” while saving the file make sure that you select “save as type= all files”
Some DOS Commands:
To change a users password: net user username new passwd
Example: To set the password of Satish as geniushackers the command would be
Net user Mukesh geniushacker
……..some more to be added soon
Some screen shots for better understanding:
Creating a batch file for windows shut down

{ 1 comments... read them below or add one }

Unknown said...

do we have to specify seconds or mins ?

Post a Comment