If you want a button that stops all your chosen running apps quickly, then you are in luck. Windows 11 lets you make such a button, and I will show you how.
Why create a panic button
There are many reasons that you want to create a panic button. Maybe you work at a co-comforting place and people sometimes come to your desk. Having a panic button ensures that they do not see your open apps. Perhaps you have been asked to share your screen, and you don’t want to display your open app.
Having the ability to close all your chosen apps quickly at a time helps you go into focus mode, if it is what you are seeing.
Close all your programs using a batch file
One way to release all your chosen running apps is using a batch file. A batch file has a set of command which runs one after the other, receiving the specified tasks.
Connected
7 Useful Batch Files You can make to automate tasks on Windows 11
Launching several apps at a time involves launching.
To create such a file, open the Windows search (press Windows+S), Type NotepadAnd launch the app. In a new document, type the following:
@echo off
taskkill /f /im chrome.exe
taskkill /f /im firefox.exe
taskkill /f /im notepad.exe
taskkill /f /im wordpad.exe
taskkill /f /im explorer.exe
timeout /t 2
start explorer.exe
In the script, next to each task cycle command, specify the process name you want to close. To find the process name of the app, right-click Windows Taskbar and choose “Task Manager”. Reach the “details” tab, and you will see the process name of each app.
After modifying the script from the menu bar of the notepad, select as the file>. Select the folder in which you want to save the file. Click on the “Save” Drop-Down Menu and choose “All Files”. Select the “File Name” field and type something PanicbuttonThen, click “Save”.
The next time you want to close all your chosen running apps, double-click on your batch file. To add your batch file shortcut to your desktop (if you have not saved the file on your desktop), right-click the file and select more options >> Send to the desktop (make a shortcut). To assign a keyboard shortcut to it, right-click on the shortcut and choose “properties”. Reach the “shortcut” tab, click on “Shortcut Key”, and press the desired key combo. Then, be sure to click “Apply” after “OK”.
Using Powershell
Powershell is another way on Windows 11 to close all its chosen running apps. To use this method, open Windows Finding (Press Windows+S), Type NotepadAnd open the app. In a new document, type the following:
Stop-Process -Name "chrome" -Force
Stop-Process -Name "firefox" -Force
Stop-Process -Name "notepad" -Force
Stop-Process -Name "wordpad" -Force
Stop-Process -Name "teams" -Force
In the script, replace the app names with apps you want to close. Be sure to use the process names of your apps and not use real names. You can find the process of an app in the task manager’s details tab.
After creating a script from the menu bar of the notepad, select the file> saved. Select the folder where you want to save the file. Click on the “Save” Drop-Down Menu and choose “All Files”. Click on the “File Name” field and type something Panicbutton.ps1Then, click “Save”.
When you want to close all your chosen open apps, right-click on your file and choose “Run with Powerrshel”.
Connected
Geek School: Learn how to automate Windows with Powershell
In this version of the Geek School, we will help you understand the powerful powerrashel scripting language which is correct in Windows, and is extremely useful to learn in the IT environment.
To create a shortcut of the file on your desktop, right-click the file and show more options >> Send to the desktop (make shortcuts). To assign a keyboard shortcut to it, right-click on the shortcut and choose “properties”. Open the “Shortcut” tab, click on the “Shortcut key” field, and press the shortcut you want to use. Then, click “Apply” after “OK”.
Using task scheduler
If you want to close your chosen open apps automatically at a specific time or when you lock your machine, integrate your batch file or powerrashel script with task scheduler.
Connected
You are not making the most functioning scheduler in Windows
Save the time by automating the tasks!
To start, open Windows Finding (Press Windows+S), Type task SchedulerAnd launch utility. On the right pane, click “Create Task”. Select the “Name” field and write a name for your work. Reach the “trigger” tab, click “new”, and choose that you want to close your apps.
For example, to close your apps while locking your PC, click on “Start” Drop-Down menu and choose “on the workstation lock”. To close the apps at a specific time, click on the “Start the Task” drop-down menu, choose “on a schedule”, and define time.
Either in case, click on “OK” and save your changes.
Open the “actions” tab and click “New”.
If you want to use your batch file, click “Browse” and select your file. If you want to use your POWERSHELL script, click on the “Program/Script” field and type Powershell.exeAdd the “argument (optional)” field and type the following (replace the script path with the actual path).
-ExecutionPolicy Bypass -File "C:\Scripts\PanicButton.ps1"
Click “OK” and choose “OK” again to save your task.
And this is how you can close your chosen running apps with a single click on Windows 11 on Windows 11. When you are on it, consider learning some power automatic flows to automate the tasks on your computer.

