If you're someone who works on a specific set of applications every time you sit down in front of your computer, you might want to be able to open them all together with a single click every time you log into your computer. We already have an article detailing how you can save time by opening all your applications together using a simple batch script.
Just like you can open apps in batches, you can also close apps in batches. To do this, we need to write a simple batch script that requires no coding knowledge. Read on to learn how to easily close multiple programs at once.
Step 1: Press the WIN D keys simultaneously Enter the desktop immediately.
On the desktop, right-click the emptyspace, click New, and then click Text Document.
Step 2: Nowdouble-clickthe text document you just created to open it.
Step 3: Next, in the text document, copy and pastethe following commands.
taskkill /F /IM /T > nul
Please note that you must replace
The command parameter description is as follows:
taskkill – Terminate the process or application.
/F - Forcefully terminate a running process.
/IM – represents the image name. /IM is followed by the image name of the process. If you don't know the image name of the process you want to kill, see Section 3: How to Find the Image Name of the Process/Application You Want to Shut Down.
/T – Terminates all child processes of a process.
nul – Suppress errors and messages.
You can add as many rows as you need. Each row corresponds to an application or program.
Finally, write @pause at the end. This is to allow you to view the results of command execution. For example, if a program won't close, you'll be able to see the reason why it won't close on the CMD screen. Otherwise, the CMD screen will turn off momentarily.
Shown below is a sample script we are using to close the programs Notepad, Calculator and WPS office using our batch script.
taskkill /F /IM Notepad.exe /T > nultaskkill /F /IM CalculatorApp.exe /T > nultaskkill /F /IM wps.exe /T > nul@暂停
When you're done, don't forget to press the CTRL S key at the same time to save the file.
Step 4: Now back to the desktop, click on the file and press the F2 keyRenamedocument.
Step 5: You can give the file any name, we named it Close Multiple Programs . Whatever name you give, pleasemake sure is in . (dot). This is the most important part.
Step 6: After entering the name, click elsewhere on the screen. You will now see the following Rename confirmation window. Press the Yes button to confirm.
Step 7: That’s it. Your batch script file is now ready. Double click on it to execute it.
Step 8: Your batch script will now close all programs specified in it.
Additionally, you will be able to see which all programs are closed on theCommand Prompt screen. This is because you put the @pause command at the end of the script. This pauses the screen and waits for key presses before closing the Command Prompt screen.
Section 2: How to Add More Programs to an Existing Batch ScriptIf you want to add more programs to the batch you want to run You can do this in the list of closed programs in the file.Step 1: Right-click the batch file you created and click Show more options.
第 2 步:从展开的菜单中,单击“编辑”选项。
第 3 步:现在,批处理脚本将在记事本中打开,您可以像往常一样在其中进行修改。
在下面的示例中,我们在脚本中又添加了一行。这一次,我们的目标也是杀死MS Paint。
本节更像是一个附录,可帮助您找到应用程序或进程的映像名称。
要杀死一个应用程序,您需要它的图像名称或它的进程 ID。对于某些应用程序,图像名称可能很简单,但对于其他一些应用程序,则无法立即猜到。在这种情况下,您可以按照以下步骤轻松找出要杀死的进程的映像名称。
第 1 步:在位于 Windows 屏幕底部的任务栏上,单击镜头图标。
第 2 步:在搜索栏上,搜索 cmd并单击以管理员身份运行选项以提升模式打开命令提示符。
第 3 步:当命令提示符启动打开时,复制并粘贴或键入以下命令以列出计算机上所有正在运行的进程。
任务列表
获得列表后,在Image Name列下,您可以滚动并找出要终止的进程/应用程序的名称。您可以在taskkill命令中使用此图像名称。
就是这样。希望您从现在开始使用这个超酷的技巧可以节省大量时间。
The above is the detailed content of Use shortcuts to instantly close multiple Windows applications at once. For more information, please follow other related articles on the PHP Chinese website!