In Windows 11 or Windows 10, the Open With context menu allows you to choose an app to open the file with. PC users can remove Programs from the Open With context menu, and can also Edit, Add, Restore, Remove items from context menu. In this post, we will show you how to add or remove Open With on the Context Menu for BAT or URL files. For Windows 11 users, when you add the Open With option, to access the item, you may need to Show more options.
Add or remove Open With on Context Menu for BAT files
A .bat (batch) file consists of a series of commands to be executed by the command-line interpreter, stored in a plain text file. A batch file can be scheduled to run automatically or run silently in the background and run as Administrator without prompt in Windows 11/10.
In Windows operating system by default, batch files do not have Open with in the right-click context menu. To make it easy for PC users to be able to quickly choose a preferred app (eg; Text Editor), to open/edit the batch file on demand, you can add the Open with option to the context menu of .bat files. This task requires you to modify the registry.
Since this is a registry operation, it is recommended that you back up the registry or create a system restore point as necessary precautionary measures.
You must be signed in as an administrator to be able to add or remove the Open with context menu for BAT files. To add Open With on context menu for BAT files in Windows 11/10, do the following:
- Press Windows key + R to invoke the Run dialog.
- In the Run dialog box, type notepad and hit Enter to open Notepad.
- Copy and paste the code below into the text editor.
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\batfile\shell\Open with\command] @="{09799AFB-AD67-11d1-ABCD-00C04FC30936}"
- Now, click the File option from the menu and select Save As button.
- Choose a location (preferably desktop) where you want to save the file.
- Enter a name with .reg extension (eg; AddOpenWith-BATmenu.reg).
- Choose All Files from the Save as type drop-down list.
- Double-click the saved .reg file to merge it.
- If prompted, click on Run > Yes (UAC) > Yes > OK to approve the merge.
- You can now delete the .reg file if you like.
To remove (default setting) Open With on context menu for BAT files in Windows 11/10, do the following:
- Open Notepad.
- Copy and paste the code below into the text editor.
Windows Registry Editor Version 5.00 [-HKEY_CLASSES_ROOT\batfile\shell\Open With]
- Repeat all the same steps as above, but this time, you can save the reg file with .reg extension (eg; RemoveOpenWith-BATmenu.reg).
The .reg files will add or remove the registry key in the registry path below:
HKEY_CLASSES_ROOT\batfile\shell\Open with
Add or remove Open With on Context Menu for URL files
A .url (Urban Resource Locator) file is an Internet shortcut that opens with your default web browser. PC users can open multiple URLs at once using Instant File Opener, and can also scan URLs to detect files and URLs for malware.
In Windows operating system by default, just like batch files, URL files do not have Open with in the right-click context menu. To make it easy for PC users to be able to quickly choose a preferred installed internet browser to open the Internet shortcut on demand, you can add the Open with option, to the context menu of .url files. This task requires you to modify the registry.
Since this is a registry operation, it is recommended that you back up the registry or create a system restore point as necessary precautionary measures.
To add Open With on context menu for URL files in Windows 11/10, do the following:
- Press Windows key + R to invoke the Run dialog.
- In the Run dialog box, type notepad and hit Enter to open Notepad.
- Copy and paste the code below into the text editor.
Windows Registry Editor Version 5.0 [HKEY_CLASSES_ROOT\IE.AssocFile.URL\ShellEx\ContextMenuHandlers\{09799AFB-AD67-11d1-ABCD-00C04FC30936}]
- Now, click the File option from the menu and select Save As button.
- Choose a location (preferably desktop) where you want to save the file.
- Enter a name with .reg extension (eg; AddOpenWith-URLmenu.reg).
- Choose All Files from the Save as type drop-down list.
- Double-click the saved .reg file to merge it.
- If prompted, click on Run > Yes (UAC) > Yes > OK to approve the merge.
- You can now delete the .reg file if you like.
To remove (default setting) Open With on context menu for URL files in Windows 11/10, do the following:
- Open Notepad.
- Copy and paste the code below into the text editor.
Windows Registry Editor Version 5.00 [-HKEY_CLASSES_ROOT\InternetShortcut\ShellEx\ContextMenuHandlers\Open With] [-HKEY_CLASSES_ROOT\IE.AssocFile.URL\ShellEx\ContextMenuHandlers\{09799AFB-AD67-11d1-ABCD-00C04FC30936}]
- Repeat all the same steps as above, but this time, you can save the reg file with .reg extension (eg; RemoveOpenWith-URLmenu.reg).
The .reg files will add or remove the registry key in the registry path below:
HKEY_CLASSES_ROOT\IE.AssocFile.URL\ShellEx\ContextMenuHandlers\{09799AFB-AD67-11d1-ABCD-00C04FC30936}
That’s it on how to add or remove Open With on context menu for BAT or URL files in Windows 11/10!
Related post: Add or remove Safe Mode to Desktop Context Menu.
How do I get rid of Open With context menu?
To remove Open With Context Menu in Windows 11/10, do the following:
- Open the Registry Editor.
- Navigate to HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers.
- At the location right-click Open With subkey in the left pane and select Delete in the context menu.
How do you add or remove items from New context menu?
To add items, select the items in the left pane and click on the Add or + button. To remove items, select items are shown in the right pane and click on the Delete or Trash button.