You are viewing our Forum Archives. To view or take place in current topics click here.
Shutdown with NOTEPAD commands!!
Posted:

Shutdown with NOTEPAD commands!!Posted:

-MrTNA-
  • Resident Elite
Status: Offline
Joined: Dec 11, 200915Year Member
Posts: 205
Reputation Power: 6
Status: Offline
Joined: Dec 11, 200915Year Member
Posts: 205
Reputation Power: 6
The 'Shutdown' Command Becomes More Flexible and Automated when used from the Command Prompt.

To Run the 'Shutdown' command from the command prompt, go to 'Start > Run', type 'cmd', and press 'Enter'.
In the black box (the command prompt) type 'Shutdown' and the Switches you want to use with the 'Shutdown' command.
You have to use at least one switch for the shutdown command to work.

The Switches :-
The 'Shutdown' command has a few options called Switches. You can always see them by typing 'shutdown -?' in the command prompt if you forget any of them.

-i: Display GUI interface, must be the first option
-l: Log off (cannot be used with -m option)
-s: Shutdown the computer
-r: Shutdown and restart the computer
-a: Abort a system shutdown
-m \\computername: Remote computer to shutdown/restart/abort
-t xx: Set timeout for shutdown to xx seconds
-c comment: Shutdown comment (maximum of 127 characters)
-f: Forces running applications to close without warning
-d [u][p]x:yy: The reason code for the shutdown u is the user code p is a planned shutdown code xx is the major reason code (positive integer less than 256) yy is the minor reason code (positive integer less than 65536)

Note :- Ive noticed using a switch with a '-' sign doesnt work sometimes.
If you are having trouble try using a '/' in place of '-' in your switches.

Examples :-
shutdown m \\computername r f
This command will restart the computer named computername and force any programs that might still be running to stop.

shutdown m \\computername r f c Im restarting your computer. Please save your work now. t 120
This command will restart the computer named computername, force any programs that might still be running to stop, give to user on that computer a message, and countdown 120 seconds before it restarts.

shutdown m \\computername a
This command will abort a previous shutdown command that is in progress.

Using A Batch File :-
You can create a file that performs the shutdown command on many computers at one time.

In this example Im going to create a batch file that will use the shutdown command to shut down 3 computers on my home network before I go to bed.

Open 'Notepad' and type the shutdown command to shut down a computer for each computer on the network.
Make sure each shutdown command is on its own line.
An example of what should be typed in notepad is given below-

shutdown m \\computer1 s
shutdown m \\computer2 s
shutdown m \\computer3 -s

Now Ill save it as a batch file by going to file, save as, change save as type to all files, give the file a name ending with '.bat'. I named mine 'shutdown.bat'.
Pick the location to save the batch file in and save it.

When you run the batch file itll shutdown computer 1, 2, and 3 for you.

You can use any combination of shutdown commands in a batch file.
#2. Posted:
Injustice
  • TTG Addict
Status: Offline
Joined: Aug 07, 201014Year Member
Posts: 2,315
Reputation Power: 104
Status: Offline
Joined: Aug 07, 201014Year Member
Posts: 2,315
Reputation Power: 104
Did you type all this?
Or is there a source you didnt give credit too?
#3. Posted:
-MrTNA-
  • Resident Elite
Status: Offline
Joined: Dec 11, 200915Year Member
Posts: 205
Reputation Power: 6
Status: Offline
Joined: Dec 11, 200915Year Member
Posts: 205
Reputation Power: 6
i typed all of it takes me some time ill prove if needed
#4. Posted:
dooon
  • Blind Luck
Status: Offline
Joined: Mar 21, 201014Year Member
Posts: 4,083
Reputation Power: 781
Status: Offline
Joined: Mar 21, 201014Year Member
Posts: 4,083
Reputation Power: 781
Very very very nice if this is typed by you.
I some how don't believe that do too you have like 6 other topics started all very long posts.
That is where i get the feel that this is copied and pasted.
#5. Posted:
JR33V3
  • TTG Undisputed
Status: Offline
Joined: Jul 14, 201014Year Member
Posts: 5,150
Reputation Power: 283
Status: Offline
Joined: Jul 14, 201014Year Member
Posts: 5,150
Reputation Power: 283
lol. i remember when i made a program that when you clicked button1, it shut down your PC. ahh i loved it.
#6. Posted:
Southerner
  • TTG Senior
Status: Offline
Joined: Sep 26, 201014Year Member
Posts: 1,341
Reputation Power: 58
Status: Offline
Joined: Sep 26, 201014Year Member
Posts: 1,341
Reputation Power: 58
Haha i guess this is helpful haha jk! Good Post
-CrankMyPlanet
#7. Posted:
i_iz_PUCK_YOUU
  • V5 Launch
Status: Offline
Joined: May 18, 201014Year Member
Posts: 985
Reputation Power: 53
Status: Offline
Joined: May 18, 201014Year Member
Posts: 985
Reputation Power: 53
i might try this if i want to mess with my brother hes only 11 itll make him mad hahaha
#8. Posted:
Elena
  • TTG Senior
Status: Offline
Joined: Oct 02, 201014Year Member
Posts: 1,245
Reputation Power: 57
Status: Offline
Joined: Oct 02, 201014Year Member
Posts: 1,245
Reputation Power: 57
Nice , but i already knew this mate.
#9. Posted:
Spartan
  • Fairy Master
Status: Offline
Joined: Oct 15, 200816Year Member
Posts: 4,519
Reputation Power: 1528
Status: Offline
Joined: Oct 15, 200816Year Member
Posts: 4,519
Reputation Power: 1528
HAhaha ima Do this on a friends computer And watch them freak:)
-This Is Sparta
#10. Posted:
-MrTNA-
  • Resident Elite
Status: Offline
Joined: Dec 11, 200915Year Member
Posts: 205
Reputation Power: 6
Status: Offline
Joined: Dec 11, 200915Year Member
Posts: 205
Reputation Power: 6
Guys please REP ME I NEED IT!! thanks yes i did write it i always can write viruses i can post if needed!

PLEASE REP AND THANK MY TOPIC
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.