Sometimes, you may want to restrict the access to an app in your Windows computer. It could be for your own purpose or for all the users in your computer. Windows offers separate permission settings for user groups in the computer for accessing the apps. You can make use of these permission settings to allow or deny permission to any app installed on the computer. For example, you can access the app as an administrator while deny access to another standard user account used by your kid. In this article, we will explain how to block apps in Windows 11 from accessing along with other options for hiding an app.
Block Apps in Windows 11
First thing is that you should be an administrator to deny permission and block an app access. Windows allows you to block an app for only administrators or only for standard users. However, make sure your user account is not part of standard users group. Otherwise, blocking access for users will also block the app access for you even though you are an administrator. Any time after blocking, you can change the permissions and get the access back when needed.
Though you can block most of the third-party app’s permissions easily, it will not work properly for some system apps like Microsoft Edge. For such a case, you can try modifying hosts file to block particular sites.
If you do not want to touch the permission, then the alternate way is to hide the app and disable searching option. This will disable the app showing in the Windows Search and allow the access only if the user unhide the executable file and opens it from its source path. This is not a reliable option for blocking as compared to denying permissions to an app.
Find Source Path of App in Windows 11
To block an app, you should first find its source file path. For example, let us block Google Chrome app that we use as an alternate browser to Edge. Right click on the Chrome shortcut on Start menu, desktop or taskbar or from wherever you have it on your computer. Select “Properties” to open the app shortcut properties. Click on “Open File Location” button to open the file in Windows File Explorer.
This will generally open the file in C:\Program Files\Google\Chrome\Application folder if you have not changed the default installation path while installing Chrome. You can get the source file location of most Windows apps under C:\Program Files\ or C:\Program Files (x86) folder directly. Make sure the file is showing as an application with .exe extension.
Disable Permission to Block App for Users
Once you find the app’s executable file, right click on it and select “Properties” to open its properties.
Go to “Security” tab in the properties dialog box to see the current permissions for the app. Click on the “Edit” button showing against “To change permissions, click “Edit” option.
It will open a permissions dialog box for the app, in our case – it is Chrome. Scroll down in “Group or user names” box and select “Users” option which should be the last item generally. Now, check the “Deny” checkbox against “Full control” option under “Permissions for Users” section. This will automatically select, all the checkboxes under “Deny” column for modify, read & execute, read and write. Click “Apply” button to apply your permission changes.
Windows will show you a pop-up mentioning the user will be denied access to the app though the user is part of another group which has permission to the app. Press “Yes” and press “OK” buttons to close all the open dialog boxes.
Check the App
Now, open the app from its shortcut or from the source executable file. You will see a message showing “Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item.” If your user account is part of both administrators and users group, you also will not be able to open the app even as an administrator.
Unblocking App Access
If you want to revert the permissions and allow app access, go to the “Security” tab in app’s properties. Edit the permissions for users group and remove the checkboxes under “Deny” column for all the options.
Remember, this will work if you have only blocked the app for “Users” group. In case, if you have selected “Administrators” and denied the full control, then you will see permission denied message under “Security” tab. You need to take over the ownership of the app by clicking on the “Change” link to get the access back.
Hiding and Disable Searching of App
If you do not want to change app permissions, then you can try this method.
- Right click on the app’s source file and select “Properties” option.
- Go to “General” tab in app properties window and check “Hidden” box against “Attributes”.
- Click on the “Advanced” button and disable the checkbox saying, “Allow this file to have contents indexed in addition to file”.
- Now, press “Win + I” keys to open Windows Settings app and navigate to “Privacy & security > Searching Windows”.
- If you are using “Enhanced” option, click on “Add an excluded folder” button and select the app’s folder for excluding it from Windows Search.
- Alternatively, scroll down and click on “Advanced indexing options” link under “Related settings” section.
- On the pop-up, click “Modify” button and exclude app’s folder for indexed locations.
These things will help to hide the app and its content from Windows Search results. Make sure to remove all the shortcuts in desktop, Start menu and taskbar so that user cannot find the traces. However, this method is not reliable as anyone can unhide the source file of the app and access it from the executable file.
Block Websites in Edge Using Hosts File
Edge is a system app and hence the “Security” tab in properties window will not show any option for “Edit” permissions. Though you can try to change the ownership to change the permissions, it may not work properly for system apps. Though you can control website permissions in Edge, we do not see any possibilities to block site within Edge or block Edge app completely. The option here is to edit your hosts file and add the site to point it to your localhost. In this way, the site will be redirected internally to open localhost which will fail.
- Search Notepad app in Windows Search and select “Run as administrator” option to open it in administrator mode.
- Go to “File > Open” and go to C:\Windows\System32\drivers\etc\ location.
- If you do not see any files, change “Text documents (*.txt)” option to “All files” and open hosts file.
- If you want to block Twitter website for example, add the following entry in the bottom of the file.
127.0.0.1 twitter.com www.twitter.com
- Save your changes to block Twitter site from Edge. If system prevents you from saving the file, then save the file to different location with the same name as hosts. Now, copy the saved file and paste it in C:\Windows\System32\drivers\etc\ folder to replace the original file.
Learn more on editing hosts file in your computer for various purposes.
If you really want an app for users in your computer, the best option is to deny the permissions for users. Hiding an app or blocking sites in Edge or additional options you can try if that is sufficient for your need.