How to Block a Program from Running in Windows 10 & Windows 11
A complete guide to preventing selected desktop apps, games, scripts, and installers from launching on a Windows PC.
๐ 9 min read๐ฅ Windows 10 & 11๐ App blockingโ๏ธ Home / Pro / Enterprise
Overview
How to Prevent a Program from Opening in Windows
Windows lets you block a program in several different ways. You can prevent a specific .exe file from starting, restrict applications for a child account, deny execution from a folder, or only block the program's network access while still allowing it to open.
The correct method depends on what you want to achieve. For example, blocking a game for one standard user is different from enforcing application control on a business PC. It is also different from blocking a program from connecting to the internet.
๐ซ
Block launch completely
Use Software Restriction Policies, AppLocker, Registry restrictions, or NTFS permissions to stop the executable from opening.
๐ค
Restrict a user account
Use Microsoft Family Safety or user-specific policies when the restriction should apply only to one person.
๐
Block network access only
Use Windows Defender Firewall when the program may run locally but must not access the internet or local network.
โน๏ธ
Important Difference
A firewall rule does not stop a program from launching. It only blocks network traffic. To stop the app from opening, use Software Restriction Policies, AppLocker, Registry restrictions, or permissions.
Comparison
Best Ways to Block a Program in Windows 10 and Windows 11
Use this comparison table to choose the safest and most suitable method before changing Windows security settings.
Method
Best For
Windows Edition
Strength
Software Restriction Policies
Blocking desktop programs by path or hash
Mostly Pro, Enterprise, Education interface
Strong
AppLocker
Advanced allow/deny rules for executables, installers, scripts, DLLs, and packaged apps
Windows 10 and 11; best suited for managed or professional environments
Strong
Microsoft Family Safety
Child accounts, app limits, games, screen time
Windows 10/11 with Microsoft accounts
Account-based
DisallowRun Registry Policy
Simple user-level blocking by executable file name
Windows 10/11, including Home
Basic
NTFS Permissions
Denying access to one file or folder for standard users
Windows 10/11
Useful but risky
Firewall Rule
Blocking internet access for an app
Windows 10/11
Does not block launch
โ
Recommended Choice
For a normal desktop program, start with Software Restriction Policies on Windows Pro, Enterprise, or Education. Use Family Safety for child accounts and Firewall only when you want to block internet access.
Preparation
Before You Block an Application in Windows
Blocking the wrong executable may break a driver utility, backup tool, antivirus component, VPN client, updater, or business application. Before you create a restriction, identify the exact file path and make sure you can reverse the change.
Find the Program's EXE File Location
Right-click the program shortcut on the desktop, Start menu, or taskbar.
Select Open file location. If this opens another shortcut, right-click it again and choose Open file location one more time.
Copy the full path to the executable, for example C:\Program Files\ExampleApp\ExampleApp.exe.
Write down the file name, such as ExampleApp.exe, because some blocking methods use only the executable name.
๐
C:\Program Files\ExampleApp\ExampleApp.exe
Create a Restore Point or Backup First
If you plan to edit the Registry, change security permissions, or create broad policy rules, create a restore point first.
SystemPropertiesProtection.exe
Do not block Windows system files such as explorer.exe, winlogon.exe, svchost.exe, or lsass.exe.
Do not deny permissions to the entire C:\Windows or C:\Program Files folder.
Use a standard test account before applying a rule to your main administrator account.
Keep a separate administrator account available so you can undo the restriction if needed.
Method 1
Block a Program from Running with Software Restriction Policies
Software Restriction Policies are one of the most practical built-in ways to block a specific executable in Windows. You can create a rule that marks a program as Disallowed, so Windows refuses to run it.
Windows 10 ProWindows 11 ProEnterprise / EducationHome: no built-in policy editor UI
Open Local Security Policy
Press Win + R.
Type secpol.msc and press Enter.
Go to Security Settings โ Software Restriction Policies.
If the folder is empty, right-click Software Restriction Policies and choose New Software Restriction Policies.
Right-click an empty area and select New Path Rule.
In Path, enter the full executable path, for example C:\Program Files\ExampleApp\ExampleApp.exe.
Set Security level to Disallowed.
Click Apply and OK.
Restart the computer or run gpupdate /force.
gpupdate /force
๐ก
Tip
A path rule is easy to understand, but it depends on the file staying in the same location. If the user can rename, move, or reinstall the program somewhere else, consider a hash rule or AppLocker.
Create a Hash Rule for a Specific File
A hash rule blocks the exact file even if it is renamed or moved. It is useful for a single executable, but the rule may stop working after the program is updated because the file hash changes.
Open Software Restriction Policies โ Additional Rules.
Right-click and select New Hash Rule.
Click Browse and select the executable file.
Set the security level to Disallowed.
Apply the rule and test it from the affected user account.
Method 2
Use AppLocker to Block Executables, Scripts, Installers, and Microsoft Store Apps
AppLocker is a more advanced Windows application control feature. It can create allow or deny rules for executable files, scripts, Windows Installer packages, DLL files, and packaged apps. It is best for business PCs, shared computers, labs, kiosks, and managed devices.
โ ๏ธ
Use Carefully
AppLocker can lock users out of important apps if rules are too broad. Create default rules first, test in audit mode when possible, and avoid applying deny rules to administrators unless you are sure.
Enable the Application Identity Service
AppLocker depends on the Application Identity service. Without it, rules may not be enforced correctly.
Press Win + R, type services.msc, and press Enter.
Find Application Identity.
Set Startup type to Automatic.
Click Start, then click OK.
Create an AppLocker Deny Rule
Press Win + R, type gpedit.msc, and press Enter.
Open Computer Configuration โ Windows Settings โ Security Settings โ Application Control Policies โ AppLocker.
Right-click Executable Rules and choose Create Default Rules. This prevents accidentally blocking normal Windows and Program Files applications.
Right-click Executable Rules again and choose Create New Rule.
Select Deny and choose the user or group affected by the restriction.
Select rule type: Publisher, Path, or File hash.
Choose the program you want to block, finish the wizard, and apply the policy.
Run gpupdate /force or restart Windows.
Rule Type
When to Use It
What to Watch Out For
Publisher
Signed applications where you want to block a vendor, product, or version range
Works only when the file has a usable digital signature
Path
Programs installed in a known folder path
A moved or copied executable may bypass the rule
File hash
Unsigned tools or one exact executable file
Updates change the hash and require a new rule
Method 3
Block or Limit Apps with Microsoft Family Safety
If the goal is to prevent a child account from using a game or app, use Microsoft Family Safety. It is designed for app limits, screen time, activity reports, web filters, and family-managed devices.
Set App and Game Limits
Open family.microsoft.com in a browser or use the Microsoft Family Safety app.
Sign in with the organizer Microsoft account.
Select the family member.
Open Apps and games or App and game limits.
Turn on limits for the app or game you want to restrict.
Set the allowed time to a very small value or define a schedule when the app is not allowed.
Good For
Child accounts and family devices.
Games and apps that should be limited by schedule.
Parents who prefer a cloud dashboard instead of local policy editing.
Limitations
Not intended as a strict enterprise application control system.
Requires Microsoft accounts and correct family group setup.
Does not replace SRP, AppLocker, or firewall rules for technical enforcement.
Method 4
Block Programs with the DisallowRun Registry Policy
The DisallowRun policy can block programs by executable file name for the current user. This is a simple option on Windows editions where the Local Group Policy Editor is not available, but it is not as strong as AppLocker or Software Restriction Policies.
โ ๏ธ
Registry Warning
Editing the Registry incorrectly can cause problems. Create a restore point first and export the key before changing it.
Enable DisallowRun for the Current User
Press Win + R, type regedit, and press Enter.
Open HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer.
Create a DWORD (32-bit) Value named DisallowRun.
Set DisallowRun to 1.
Create a subkey named DisallowRun under the Explorer key.
Inside that subkey, create string values named 1, 2, 3, and so on.
For each string value, enter the executable file name to block, such as notepad.exe or game.exe.
Sign out and sign back in, or restart Windows.
Example REG File
This example blocks notepad.exe and game.exe for the current user.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"DisallowRun"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun]
"1"="notepad.exe"
"2"="game.exe"
How to Remove the Registry Block
To unblock the programs, delete the executable names from the DisallowRun subkey or set the DisallowRun DWORD value to 0.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"DisallowRun"=dword:00000000
Method 5
Use NTFS Permissions to Stop a Program from Opening
You can also prevent a standard user from launching a program by removing or denying access to the executable file. This method works at the file system level, but it must be used carefully because permission mistakes can break updates or make the application hard to repair.
Deny Execute Permission for a Standard User
Find the program's .exe file.
Right-click it and select Properties.
Open the Security tab.
Click Edit.
Select the standard user or group you want to restrict.
Use Deny carefully for Read & execute, or remove that user's permission if the interface allows it safely.
Click Apply and test with the affected account.
โ
Avoid Broad Deny Rules
Do not deny permissions to Everyone, Users, or Administrators unless you fully understand the consequences. A broad deny rule can override allowed permissions and make recovery harder.
When NTFS Permissions Make Sense
You need to restrict one local standard user on one computer.
The program is installed in a fixed location.
You do not want to edit Group Policy or Registry settings.
You have an administrator account that can restore permissions later.
Method 6
Block a Program's Internet Access with Windows Defender Firewall
If you only need to stop a program from going online, create an outbound firewall rule. The program will still open, but Windows Defender Firewall will block its network connections.
Create an Outbound Firewall Rule
Press Win + R, type wf.msc, and press Enter.
Select Outbound Rules.
Click New Rule.
Select Program and click Next.
Choose This program path and browse to the executable.
Select Block the connection.
Apply the rule to Domain, Private, and Public profiles if you want it blocked everywhere.
Name the rule clearly, for example Block ExampleApp outbound access.
wf.mscโOutbound RulesโNew RuleโProgram
PowerShell Example
You can also create the outbound block rule from an elevated PowerShell window.
After creating a restriction, test it from the same account that should be affected. Do not test only from an administrator account, because many rules are user-specific or group-specific.
How to Test the Block
Restart Windows or sign out and sign in again.
Open the affected user account.
Try to start the program from the desktop, Start menu, File Explorer, and Run dialog.
If you created a firewall rule, open the program and check whether online features fail to connect.
Check Event Viewer if AppLocker or policy rules do not behave as expected.
Why the Program Still Opens
Problem
Likely Cause
Fix
The app opens from another folder
Only one path was blocked
Use a hash rule, publisher rule, or block all known install paths
The app opens after an update
The executable changed
Update the hash rule or use a publisher/path rule instead
The rule works for one user but not another
The rule is user-specific
Check the user or group selected in the rule
Firewall rule does not stop launch
Firewall blocks traffic, not execution
Use SRP, AppLocker, Registry restrictions, or permissions
How to Unblock the Program
Software Restriction Policies: delete the path/hash rule or change it from Disallowed to Unrestricted.
AppLocker: remove the deny rule, change the enforcement mode, or update the affected user/group scope.
Family Safety: remove the app limit or adjust the allowed schedule.
Registry DisallowRun: delete the executable name from the DisallowRun subkey or set the policy value to 0.
NTFS permissions: restore Read & execute permission for the affected user.
Firewall: disable or delete the outbound block rule.
FAQ
Frequently Asked Questions About Blocking Programs in Windows
Q
Can I block a program without uninstalling it?
โผ
Yes. You can keep the program installed and block it from running with Software Restriction Policies, AppLocker, Registry restrictions, NTFS permissions, or account-based controls.
Q
What is the easiest way to block a program in Windows Home?
โผ
For Windows Home, the simplest built-in options are Microsoft Family Safety for child accounts, the DisallowRun Registry policy for basic user-level blocking, or NTFS permissions for a specific standard user. Windows Home does not include the normal Local Group Policy Editor interface.
Q
Does Windows Firewall block a program from opening?
โผ
No. Windows Firewall can block inbound or outbound network traffic, but it does not prevent the executable from starting. Use application control policies or permissions if you need to stop the program from launching.
Q
Can a user bypass a path-based block?
โผ
Sometimes, yes. If the user can copy, rename, reinstall, or run another copy of the executable from a different location, a simple path rule may not be enough. Use a hash rule, publisher rule, AppLocker, or tighter permissions when stronger enforcement is required.
Q
Should I block programs by deleting their EXE files?
โผ
Usually no. Deleting executable files can break uninstallers, updates, repair tools, and file associations. It is better to use policy rules, permissions, Family Safety, or a firewall rule depending on your goal.
Related Guides
Related Windows Security and App Management Guides
The best way to block a program from running in Windows depends on the goal. For a specific desktop application, Software Restriction Policies are usually the most practical built-in method. For managed environments, AppLocker offers stronger and more flexible application control. For children, use Microsoft Family Safety. For internet access only, use Windows Defender Firewall.
Before applying any restriction, confirm the exact .exe path, avoid blocking Windows system files, and keep an administrator account available so you can reverse the rule if something goes wrong.