Skip to content

Create Emergency Off Button For Closing All Running Apps Instantly on Windows 11

July 18, 20254 minute read

If you ever need to close all applications you’re currently running on your computer with a click, Windows 11 has a feature. You can create an Emergency Off button for this purpose, which will act like a panic shutdown switch for all running apps. In this guide, I’ll explain how to set it up.

Emergency Off button for closing all running apps on Windows 11

There are several reasons you might want to create an Emergency Off button for apps. If you’re in a co-working space where people often approach your desk, having Emergency Off button can be extremely helpful for quickly hiding your open programs.

This feature is also beneficial when you’re asked to share your screen during meetings, as it allows you to close any apps you wish to keep private.

Plus, the option to close all selected applications at once can help you enter a Focus Mode, enabling you to concentrate more effectively on your tasks.

How to Create an Emergency Off Button to Close All Apps on Windows 11?

Method 1: Creating an Auto-Closing Batch File

1. First, open Notepad app on your computer.

2. Enter the below command in Notepad (replace app process name with the apps you want to close).

@echo off
taskkill /f /im chrome.exe
taskkill /f /im firefox.exe
taskkill /f /im notepad.exe
taskkill /f /im Copilot.exe
taskkill /f /im explorer.exe
timeout /t 2
start explorer.exe

Create a batch file to close all running apps

Bonus Tip: To find an app’s process name, right-click on the Windows taskbar and select “Task Manager.” Then, navigate to the “Details” tab, where you will find the process name for each application.

3. Now, click “File”, select “Save As” and choose the folder (for example, desktop) in which you want to save the file.

4. Click the “Save as Type” drop-down menu and choose “All Files.”

5. In “File name” field, type, for example, EmergencyOff.bat and click “Save.”

You have successfully created an emergency shutdown option to close all specified apps by simply double-clicking your batch file.

How to Create a Desktop Shortcut for the Batch File?

If your batch file is not saved on the desktop, you can create a shortcut for it.

  • Right-click the file, select “Show More Options,” then choose “Send To” and click on “Desktop (Create Shortcut).”
  • To assign a keyboard shortcut, right-click the shortcut and select “Properties.”
  • In the “Shortcut” tab, click on “Shortcut Key” and press your desired key combination.
  • Finally, remember to click “Apply” and then “OK” to save your changes.

Method 2: Creating an Auto-Closing PowerShell Script File

1. Open Notepad on your Windows 11 computer and type the following.

Stop-Process -Name "chrome" -Force
Stop-Process -Name "firefox" -Force
Stop-Process -Name "notepad" -Force
Stop-Process -Name "Copilot" -Force
Stop-Process -Name "teams" -Force

Note: Replace the app process names with the apps you’d like to close. You can find an app’s process name in the Details tab of Task Manager.

2. Now, click File, select Save As and choose the folder (for example, desktop) in which you want to save the file.

3. Click the “Save as Type” drop-down menu and choose “All Files.”

4. In “File name” field, type like EmergencyOff.ps1 and click “Save.”

5. Now, to close all your chosen open apps, right-click your file and choose “Run With PowerShell.”

How to Automatically Close All Apps on Windows 11 Using Task Scheduler?

If you want to automatically close your selected open apps at a certain time or when you lock your computer, you can use Task Scheduler to connect your Batch file or PowerShell script.

1. First launch the Task Scheduler utility on your Windows 11 (use Windows search to find the utility)

2. On the right pane of the utility, click “Create Task.”

3. In the popup window enter a name for your task in the “Name” field.

Automate closing running apps on Windows 11

4. Next, select “Triggers” tab, click “New,” and click the “Begin the Task” drop-down menu.

5. Choose any option. For example, to close the apps at a specific time, select “On a Schedule,” and define the time and click OK to confirm.

Automate closing running apps on Windows 11

6. Now, click the “Actions” tab and click “New.”

7. Browse and select your batch file.

8. To add your PowerShell script, in the “Program/Script” field, enter powershell.exe.

9. In the “Add Arguments (Optional)” field, input the following command, making sure to replace the script path with the actual path to your script: -ExecutionPolicy Bypass -File "C:\Scripts\EmergencyOff.ps1"

10. Finally, click “OK” to save your task.

Conclusion:

That’s how you can quickly close your selected running applications with just one click or keystroke on Windows 11.

JP, how-to expert and IT specialist with two decades of experience. He shares his knowledge through blogging filled with practical tips and guidance to help you enhance your computer and smartphone skills.

Previous Article --- Next Article

No Comments

Comments (0)

Leave a Reply

Related Posts
Recent Articles
Tutorials
Back To Top