In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article is about how bat shuts down automatically on a regular basis. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Automatic termination program
Ntsd is a dos command that is used to end some dead processes that cannot normally be ended.
Usage: after opening cmd, enter the following command to end the process:
Method 1: use the PID of the process to end the process
Command format: ntsd-c Q-p pid
Command example: ntsd-c Q-p 1332 (end explorer.exe process)
Example details: the pid of explorer.exe is 1332, but how to get the pid of the process? Enter TASKLIST under CMD to get the PID of all processes in the current task manager
Method 2: use the process name to end the process
Command format: ntsd-c Q-pn * .exe (* .exe is the process name, exe cannot be omitted)
Command example: ntsd-c Q-pn explorer.exe
Another DOS command that can end a process is taskkill:
Command format: taskkill / pid 1234 / f (the same can be achieved. )
More commonly used, such as: taskkill / f / im Explorer.exe (shut down the Explorer.exe process)
For example:
TASKKILL / S system / F / IM notepad.exe / T
TASKKILL / PID 1230 / PID 1241 / PID 1253 / T
TASKKILL / F / IM notepad.exe / IM mspaint.exe
TASKKILL / F / FI "PID ge 1000" / FI "WINDOWTITLE ne untitle*"
TASKKILL / F / FI "USERNAME eq NT AUTHORITY\ SYSTEM" / IM notepad.exe
TASKKILL / S system / U domain\ username / FI "USERNAME ne NT*" / IM *
TASKKILL / S system / U username / P password / FI "IMAGENAME eq note*"
Taskkill / f / im TEL.exe
Taskkill / f / im MT.exe
Taskkill / f / im EastFaxServer.exe
Taskkill / f / im EastFaxExtPrinter.exe
Taskkill / f / im EastFaxService.exe
Net stop mssqlserver
Automatic shutdown
At 22:00 shutdown-s shuts down at 22:00 every day
At 22:00 / every:S shutdown-s shuts down regularly at 22:00 every Saturday
At 22:00 / every:3 shutdown-s shuts down regularly at 22:00 on the 3rd of every month at 21:30 shutdown-f-r restarts the computer at 21:30 every day
At 21:30 shutdown-f-s shuts off the computer at 21:30 every day and writes down shutdown-s-t in notepad. It's time to ok. If you want to get rid of it, just shutdown-a.
So it's OK.
Finally, directly save to the .bat file start menu run type cmd enter enter shutdown-s-t default 60 seconds shutdown, you want to set time, just put a space after t and enter a number (time unit is seconds). Cancel the scheduled shutdown: shutdwon-a, answer supplementary at / every:4 10:47 shutdown-f-r you can enter at 10:47 on the 4th of each month where you restart the computer 4
(1-31) if it is the day of the week, you can enter (M, T, W, Th, F, S, Su) 7 days at 21:30 / every:w,f,su shutdown-s-f-t 0 answer supplement at 21:30 / every:M,T,W,Th,F,S,Su shutdown-s-f-t 0 enter in notepad
Echo off
At 23:30 shutdown-s-f
Echo on
Then save as a batch file, that is, a bat file (such as aa.bat)
Then put the batch file into the start-- program-- start it.
If you want to turn it off, enter shutdown-a directly.
Other parameters of shutdown
-I display the GUI interface, must be the first option
-l logout (cannot be used with option-m)
-s shut down this computer
-r shut down and restart this computer
-an abandon system shutdown
-m\\ computername remote computer shutdown / restart / abandon
-t xx sets the timeout to be turned off to xx seconds
-c "comment" turns off comments (127characters maximum)
-f forces the running application to close without warning
-d [u] [p]: xx:yy shutdown reason code
Thank you for reading! This is the end of this article on "how to automatically shut down bat at a fixed time". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 236
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.