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.
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.
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:
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.
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.
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: 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.