How to Prevent Users and Yourself From Closing a Program in Windows [2025 Guide]

If you’re looking to prevent programs like Microsoft Outlook from closing, I got good news for you. There are a few native Windows tricks you can apply.

I also tested some apps that claim to disable the close button.

Below, I’ll give you an overview of these apps and also show you a few tricks to stop apps from closing with Windows tools like the Kiosk Mode or Group Policy Editor.

Tools to stop users from closing apps in Windows

1. NoClose

NoClose

If you’ve heard of DonationCoder, Skrommel came out with a simple and easy to use portable tool called NoClose where it simply disables the Close (X) button located at the top right of the window. To disable the close button on a selected window, press Ctrl+1 to temporarily enable or disable it. If you want the changes to be permanent, press Ctrl+2 instead to add the program to the rules. Make sure that NoClose is running or else it won’t work. From what I’ve noticed, NoClose only disables the Close button located at the top right of the window while other methods such as Alt+F4 still works. It is possible to change the default hotkeys from the Settings by right clicking on the NoClose icon at the notification area and select Settings. NoClose is free and has been successfully tested on Windows 7 SP1 32-bit without problems.

2. WinTopMost

WinTopMost

WinTopMost is the most expensive software in its category that cost $65 for a single license. Other than disabling the Close button by graying it out, it can also set a window to be topmost based on the program’s title. For WinTopMost to disable a program’s close button, click the Add button at the 2nd box and enter the program’s name that is displayed on the title, for example, Firefox. WinTopMost also needs to be active to disable the close button and it doesn’t prevent against Alt+F4 hotkey.


3. Actual Window Guard

Actual Window Guard

Actual Window Guard is a shareware that cost $29.95 for a single license and it comes with a 60 days trial. It is quite powerful in the sense that it allows you to create very detailed specific settings other than just disabling the close button. It also allows you to assign priorities, window size and position, and automatic actions such as changing caption, icon, staying always on top, open as, send to bottom, close and etc when the program is started. Actual Window Guard offers an additional method to prevent any window from accidental close by showing a confirmation prompt when you want to close the program.

4. Actual Window Manager

Actual Window Manager

Actual Window Manager is the bigger brother of Actual Window Guard. It is also a shareware that cost slightly more expensive when compared to Actual Window Guard at $49.95 due to having more features. Other than disabling the close button and showing a confirmation window, it comes with an additional option where you can manually close the window by right clicking on the close button. This options is very useful to manually close the program because both Actual Window Manager and Actual Window Guard blocks the Alt+F4 hotkeys as well.

5. NoVirusThanks Process Protector

NoVirusThanks Process Protector

NoVirusThanks is an Italian company that puts their focus more to security. Process Protector is a shareware that cost $19.99 and there are no trial version for you to test it out. The program claims to defend against process termination so I requested a license to test it. Upon testing, it seems to only protect against abnormal or external method of termination such as killing the process from Windows Task Manager, while still allowing the user to close the program by clicking the X button or using Alt+F4.

For simple use, I would say that NoClose seems to do the job pretty well plus it is lightweight and free. If you prefer to go for something more powerful with more features and willing to fork out some money, do give Actual Window Manager a try because you will not be disappointed.

Now, let’s move on to methods that require no software buying/installation. Note that they may not give you as many options and you’ll have to go through a few workarounds.

Prevent Programs from Closing: Manual Solutions

1. Try Kiosk Mode

  1. Open Settings > Accounts > Family & other users.
  2. Under Set up a kiosk, click Assigned access.set up a kiosk
  3. Choose the account and select the app you want to lock to.choose a kiosk app
  4. Once configured, the system will only allow that specific app to run, preventing users from closing it.

Kiosk Mode is a built-in feature in Windows 10 and 11 that locks down a device to only run a specific application.

By using this mode, users are unable to close or switch away from the chosen app. This is perfect for scenarios where you need a program running continuously, such as in a business environment or public kiosk.

2. Use the Group Policy Editor

  1. Press Windows + R, type gpedit.msc, and press Enter to open the Group Policy Editor.gpedit command run
  2. Navigate to User Configuration > Administrative Templates > Start Menu and Taskbar.gpedit start menu and taskbar
  3. Locate and enable the policy Do not allow pinning programs to the taskbar or other related options to restrict certain behaviors.do not allow pinning store app to the taskbar
  4. Alternatively, you can also use Group Policy to configure taskbar settings, preventing the close button from appearing for specific applications.

Group Policy is another powerful tool for preventing users from closing applications. This method works especially well in a corporate environment where you need to enforce rules across multiple machines.

3. Batch Files or Scripts

Another manual solution is to create a batch file or PowerShell script that automatically restarts a program if it is closed. This is useful if you want to make sure your program keeps running without needing to constantly monitor it.

  1. Open Notepad and enter the following script: batchCopyEdit:start tasklist /FI "IMAGENAME eq [ProgramName].exe" 2>NUL | find /I "[ProgramName].exe">NUL if %errorlevel% NEQ 0 start [FullPathToProgram] timeout /t 10 goto start Replace [ProgramName] and [FullPathToProgram] with the actual program name and path.
  2. Save the file as RestartProgram.bat.
  3. Run the batch file whenever you need to ensure the program stays open.

Final Thoughts

In conclusion, there are several effective ways to prevent programs from closing on Windows, depending on your needs and preferences. If you’re looking for a straightforward solution, NoClose is a free and lightweight tool that works well for basic use. For those who want more advanced features, Actual Window Manager offers a range of options, including blocking the close button and preventing accidental closures.

While the solution for Chrome was straightforward with the Google Toolbox extension, these tools offer varying levels of success for other software. Choose the one that best fits your needs to avoid accidental closures.

However, if you prefer not to rely on third-party software, Windows also offers native tools such as Kiosk Mode, Group Policy Editor, and Batch Files that can be set up to prevent program closures or automatically restart applications. While these solutions might not provide as much control as some paid software, they are effective and cost-free options for managing app behavior.

3 Comments - Write a Comment

  1. Udo Leverentz Mayer 5 years ago
  2. Udo Leverentz Mayer 5 years ago
    • HAL9000 5 years ago

Leave a Reply

Your email address will not be published. Required fields are marked *

Note: Your comment is subject to approval. Read our Terms of Use. If you are seeking additional information on this article, please contact us directly.