1. Click the Start menu, select All Programs, find the attachments folder, and click Run. 2. Enter the cmd command in the open run window, and then press the Enter key to open the command prompt window. 3. Enter shutdown –f –s –t number in the command prompt window and press the Enter key. Among them, the following number is in seconds. For example, entering 36000 means that the Win7 system will shut down the computer after 36000 seconds.
2. If we need to cancel the automatic shutdown function, we can enter "shutdown -a" in the cmd command prompt and press the Enter key to cancel the automatic shutdown.
The representation of each command is as follows:
-s Shut down this computer
-f Forces running applications to close without warning
-t xx Set the shutdown time to xx seconds later
-a Give up system shutdown
3. How to cancel the automatic shutdown command when we set the automatic shutdown. See the steps below.
(1) Scheduled shutdown: For example, if you want to shut down the computer at 10 o'clock, enter at 22:00 Shutdown -s in Start-Run. The system will prompt 30 seconds in advance and then turn itself off.
(2) Countdown to shutdown: If you need to count down to shutdown, you can enter Shutdown.exe -s -t 7200 in Start->Run, where "7200" is replaced with the countdown time you want in seconds, for example, if you want Shut down after 20 hours, it should be 60*60*20=72000 seconds. Set the computer to shut down automatically.
(3) Cancel automatic shutdown: Enter shutdown -a in Start->Run, and enter "shutdown -i" to open the automatic shutdown setting dialog box and set automatic shutdown.
Set a scheduled automatic shutdown
If you need the computer to automatically shut down at 20:20, you only need to select "Run" in the "Start" menu, then enter at 20:20 Shutdown -s, and click "OK". In this way, when the computer system time reaches 20:20, the computer will automatically display the "System Shutdown" dialog box, and will automatically shut down after 30 seconds. This 30 seconds is to allow the user to save the currently running work before shutting down to avoid causing problems. unnecessary loss. Computer automatic shutdown command
Note: The -s parameter refers to the local computer.
Setting 2 Countdown to automatic shutdown
If you need the computer to shut down automatically after 10 minutes, you only need to select "Run" in the "Start" menu, then enter Shutdown -s -t 600, and click "OK". The computer will then start counting down, and the computer will automatically shut down after 10 minutes.
Note: The -t parameter is a countdown command for automatic shutdown, and the 600 parameter is 10 minutes or 600 seconds.
-f: Forcefully close the application. How to set the computer to automatically shut down
-m:\\computer name: control remote computer
-i: Display the graphical user interface, but must be the first option of Shutdown
-l: Log out the current user
-r: Shut down and restart
-t: Time: Set shutdown countdown
-c: "Message content": Enter the message content in the shutdown dialog box (no more than 127 characters)
1. Click "Command Prompt" or "Win R" on the Start menu to open the run window and enter cmd to open the command prompt window;
2. Enter "shutdown" and press Enter. The rules for using the command will be listed below. Here are some commonly used ones;
3. shutdown -s -t 60 -f, s is the abbreviation of shutdown, t is the abbreviation of time, which means shutdown without any prompt after 60 seconds. If 60 is changed to 00, it will shut down immediately;
4. shutdown -r -t 60, r is the abbreviation of restart, which means restart after 60 seconds;
5. shutdown -l -t 60, l is the abbreviation of logout, which means logout after 60 seconds;
6. shutdown -h -t 60, h is the abbreviation of hibernate, which means sleeping after 60 seconds;
7. at 23:00 shutdown -s, which means shutting down at 23:00;
8. Shutdown -a, a is the abbreviation of all, which means to cancel all shutdown commands, but not the previous command.
The above is the detailed content of How to set and cancel the automatic shutdown command in win7. For more information, please follow other related articles on the PHP Chinese website!