Add or remove Open with in context menu for BAT or URL files in Windows


In Windows 11 or Windows 10, the Open with The context menu allows you to choose an application with which to open the file. PC users can remove programs from the Open With context menu and can also edit, add, restore, and remove context menu items. In this article, we will show you how add or remove Open with in context menu for BAT or URL files. For Windows 11 users, when you add the Open with to access the item, you may need Show more options.

Add or remove Open with in 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 prompting in Windows 11/10.

In the default Windows operating system, batch files do not have Open with in the right-click context menu. To allow PC users to quickly choose a preferred application (e.g. text editor), open/edit batch file on demand, you can add the Open with option in the context menu of .bat files. This task requires you to edit the registry.

Since this is a registry operation, it is recommended to backup the registry or create a system restore point as necessary precautionary measures.

You must be logged in as an administrator to add or remove the Open With context menu for BAT files. Add Open with in the context menu of BAT files in Windows 11/10, follow these steps:

  • Hurry Windows key + R to invoke the Run dialog box.
  • In the Run dialog box, type notepad and press Enter to open Notepad.
  • Copy and paste the code below into the text editor.
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOTbatfileshellOpen withcommand]
@="{09799AFB-AD67-11d1-ABCD-00C04FC30936}"
  • Now click on the Case option in the menu and select Save as button.
  • Choose a location (preferably the desktop) where you want to save the file.
  • Enter a name with .reg extension (for example; AddOpenWith-BATmenu.reg).
  • Choose All the files of save as type the drop-down list.
  • Double-click the saved .reg file to merge it.
  • If prompted, click Run > Yes (UAC) > Yes > OKAY to approve the merger.
  • You can now delete the .reg file if you wish.

To remove (default setting) Open with in the context menu of 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_ROOTbatfileshellOpen With]
  • Repeat all the same steps as above, but this time you can save the reg file with .reg extension (for example; RemoveOpenWith-BATmenu.reg).

The .reg files will add or remove the registry key in the registry path below:

HKEY_CLASSES_ROOTbatfileshellOpen with

Add or remove Open with in context menu for URL files

Add or remove Open with in context menu of 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 the default Windows operating system, just like batch files, URL files do not have Open with in the right-click context menu. To allow PC users 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 edit the registry.

Since this is a registry operation, it is recommended to backup the registry or create a system restore point as necessary precautionary measures.

Add Open with in the context menu of URL files in Windows 11/10, please do as follows:

  • Hurry Windows key + R to invoke the Run dialog box.
  • In the Run dialog box, type notepad and press Enter to open Notepad.
  • Copy and paste the code below into the text editor.
Windows Registry Editor Version 5.0

[HKEY_CLASSES_ROOTIE.AssocFile.URLShellExContextMenuHandlers{09799AFB-AD67-11d1-ABCD-00C04FC30936}]
  • Now click on the Case option in the menu and select Save as button.
  • Choose a location (preferably the desktop) where you want to save the file.
  • Enter a name with .reg extension (for example; AddOpenWith-URLmenu.reg).
  • Choose All the files of save as type the drop-down list.
  • Double-click the saved .reg file to merge it.
  • If prompted, click Run > Yes (UAC) > Yes > OKAY to approve the merger.
  • You can now delete the .reg file if you wish.

To remove (default setting) Open with in the context menu of 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_ROOTInternetShortcutShellExContextMenuHandlersOpen With]

[-HKEY_CLASSES_ROOTIE.AssocFile.URLShellExContextMenuHandlers{09799AFB-AD67-11d1-ABCD-00C04FC30936}]
  • Repeat all the same steps as above, but this time you can save the reg file with .reg extension (for example; RemoveOpenWith-URLmenu.reg).

The .reg files will add or remove the registry key in the registry path below:

HKEY_CLASSES_ROOTIE.AssocFile.URLShellExContextMenuHandlers{09799AFB-AD67-11d1-ABCD-00C04FC30936}

That’s all about how to add or remove Open with in context menu for BAT or URL files in Windows 11/10!

Similar item: Add or remove safe mode from the desktop context menu.

How do I remove the Open With context menu?

To remove Open with context menu in Windows 11/10, follow these steps:

  • Open Registry Editor.
  • Move towards HKEY_CLASSES_ROOT*shellexContextMenuHandlers.
  • In the location, right-click Open with subkey in the left pane and select To delete in the context menu.

How do I add or remove items from the New context menu?

To add items, select the items in the left pane and click the Add or + button. To delete items, select the items are displayed in the right pane and click the To delete or Waste button.

Previous Family of home demolished after landslide filed $5 million tort claim against City of Bellevue
Next Ow.ly, Twitter URL shortener, Bitly, Rebrandly, TinyURL - The Bite