If you do not want to use the default app to be launched when you click on a file or URI scheme, you can block it using the Local Group Policy Editor as well as the Registry Editor in Windows 11/10.
Let’s assume that you have a hyperlink containing a URI scheme such as HTTP, mailto, etc. If you click the http:
link, Windows opens the default browser to show you the webpage. Similarly, if you click on a mailto:
link, it opens the default email client or app on your computer to let you compose the email. These functionalities help you to view the content without doing anything extra. However, if you want to disable the default app openings due to a URI or file scheme, here is how to do that.
Block launching apps associated with File or URI scheme
To prevent launching apps associated with file or URI scheme, follow these steps-
- Press Win+R to open the Run prompt.
- Type gpedit.msc and hit the Enter button.
- Navigate to App runtime in Windows Components.
- Double-click on Block launching desktop apps associated with a file.
- Select Enabled.
- Click on Apply and OK.
- Double-click on Block launching desktop apps associated with a URI scheme.
- Select Enabled.
- Click on Apply and OK.
Let’s check out these steps in detail.
At first, you will have to open the Local Group Policy Editor on your computer. For that, press Win+R, type gpedit.msc
, and hit the Enter button. Once opened, navigate to this path-
User Configuration > Administrative Templates > Windows Components > App runtime
On your right-hand side, you will get two settings-
- Block launching desktop apps associated with a file
- Block launching desktop apps associated with a URI scheme
Double-click on each of them, select Enabled and click on Apply and OK buttons to save the change.
As mentioned earlier, you can do the same with the help of the Registry Editor. Before getting started, it is recommended to create a Registry file backup and create a System Restore point.
Related: URI Commands to open Microsoft Store apps.
Prevent launching apps associated with file or URI scheme using Registry Editor
To prevent launching apps associated with file or URI scheme using Registry Editor, follow these steps-
- Search for regedit in the Taskbar search box.
- Click on Registry Editor in the search result.
- Click the Yes button in the UAC prompt.
- Navigate to Associations in the HKEY_CURRENT_USER.
- Right-click on Associations > New > DWORD (32-bit) Value.
- Name them as BlockProtocolElevation and BlockFileElevation.
- Set the Value data as 1.
- Click OK to save the change.
To know more, keep reading.
To get started, search for the regedit
in the Taskbar search box and click on Registry Editor in the search result. After clicking the Yes button and opening the Registry Editor on your computer, navigate to this path-
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Associations
If you do not file Associations key, right-click on Policies, select New > Key. Following that, name it as Associations.
After doing that, right-click on the Associations and select New > DWORD (32-bit) Value.
It will create new REG_DWORD value on the right-hand side. Name it as BlockProtocolElevation. It represents Block launching desktop apps associated with a URI scheme.
Follow the same steps to create another DWORD (32-bit) Value and name it as BlockFileElevation. It represents Block launching desktop apps associated with a file.
Now, double-click on each REG_WORD value, and set the Value data as 1.
Click the OK button to save changes.
I hope it helps.