xp Running Commands
ShutDown Command 2006-10-30 00:39
Usage: shutdown <-i | -l | -s | -r | -a> <-f> <-m \computername> <-t xx> <-c "comment"> <-d up:xx:yy>
at 22:00 Shutdown -s
No parameters Display this message (same as ?)
-i Display GUI interface, must be the first option
-l Log off (cannot be used with option -m)
-s Shut down this computer
-r Shut down and restart this computer
-a Abort system shutdown
-m \computername Shut down/restart/abort remote computer
-t xx Set shutdown timeout to xx seconds
-c "comment" Shutdown comment (maximum 127 characters)
-f Force running applications to close without warning
-d
:xx:yy Shutdown reason code
u is user code
p is a planned shutdown code
xx is a major reason code (positive integer less than 256)
yy is a minor reason code (positive integer less than 65536)
-f: Force close applications
-m \computer name: Control remote computer
-i: Display graphical user interface, but must be the first option of Shutdown
-l: Log off current user
-r: Shutdown and restart
-t time: Set shutdown countdown
-c "message content": Enter message content in shutdown dialog (cannot exceed 127 characters
2. Examples:
Shut down computer shutdown –s (Method: "Start" -> "Run" -> "shutdown -s" -> "OK")
Shut down computer with 3-second delay shutdown –s –t 3 (Method: "Start" -> "Run" -> "shutdown –s –t 3" -> "OK")
Cancel shutdown computer shutdown –a (Method: "Start" -> "Run" -> "shutdown –a" -> "OK")
3. Applications:
(1) If you want to automatically shut down the computer after 1 hour, for example: You are downloading a software or a movie, and you have an urgent matter to go to Lishui, what will you do? Stop downloading? It's a pity! Continue? How to shut down the computer after downloading? Don't worry! You can use this command to solve:
shutdown –s –t 3600 (The system shuts down the computer after 3600 seconds, time is customizable)
You can rest assured to go to Lishui, and don't have to worry about your computer being on for a long time.
(2) RPC vulnerability causes countdown automatic shutdown, use this command to cancel countdown automatic shutdown:
shutdown –a (Method: "Start" -> "Run" -> "shutdown –a" -> "OK")
A while ago, network viruses were very rampant, such as Slammer, Blaster, etc., which were designed for the RPC (Remote Procedure Call) vulnerability of Windows XP, which caused the system to countdown automatic shutdown, which troubled many students and teachers. As shown in the following figure:
(3) Use Shutdown command to achieve network unified shutdown
My unit often has many teachers not turning off computers after work, and the leader found out and required to solve this problem. I thought if I went to each office to check, it would take a lot of time, so I thought whether I could turn off all machines through one computer. Because all office computers are installed with Windows XP system, I thought of using the remote shutdown "Shutdown" command. The specific method is as follows:
Step 1 Click "Start → Run", enter "Gpedit.msc" in the dialog box, click <OK>, and open the "Group Policy Editor".
Step 2 In the "Group Policy Editor" window, open "Computer Configuration → Windows Settings → Security Settings → Local Policies → User Rights Assignment" on the left, select "Force shutdown from a remote system" in the right window. The pop-up dialog shows that only members of the "Administrators" group can remotely shut down; click the <Add User or Group> button at the bottom of the dialog, then enter "Heyongsheng" (administrator account) in the pop-up dialog, and then click <OK>.
Step 3 At this time, a "Heyongsheng" user is added in the properties of "Force shutdown from a remote system", click <OK>, and finally close the "Group Policy Editor" window.
After performing the above operations on the computers in each office, we granted the "Heyongsheng" user of each computer the right to remotely shut down. When it's time to get off work, I just need to perform the following operations on my own machine:
Step 4 Click "Start → Run", enter "Shutdown -I" in the dialog box, and the "Remote Shutdown" dialog box will be displayed on the screen (Figure 1).
Figure 1 Remote shutdown control window
(4) Use XP's ShutDown.exe to realize server timing restart
The shutdown of Windows XP is controlled by the Shutdown.exe program, which is located in the WindowsSystem32 folder. If you want Windows 2000 to achieve the same effect, you can copy Shutdown.exe to the system directory System32.
First of all, it is required that the motherboard must support software shutdown function, otherwise you have to press the power switch in person to shut down. Now the motherboards generally support software shutdown. Operation steps: Click "Start"/Program/Accessories/System Tools "Scheduled Tasks", pop up the scheduled tasks window, then double-click "Add Scheduled Task", run the "Scheduled Task Wizard", press "Browse", find the Rundll32.exe file in the WINDOWS directory, click "Open" button, type the name of the task (such as "Scheduled Shutdown") in the appearing dialog box, select "Daily" for the execution method, then press "Next" to select the scheduled shutdown time (you can first test it 1 minute later than the time displayed on the current machine), next select "Open the advanced properties of this task when clicking Finish", click "Finish", and finally right-click "Scheduled Shutdown" to open the properties, enter "C:WINNTsystem32shutdown.exe -r -t 1" in the run bar, click "OK" soon, OK.
4. Conclusion: The shutdown command in Windows XP is very powerful, you can try to use it, dig out the functions, and serve us.
SHUTDOWN.EXE command under DOS system SHUTDOWN S (Shut down) SHUTDOWN R (Restart)
[ Last edited by shanliang8008 on 2007-8-16 at 08:41 PM ]