Windows 10: Add Open with to Context Menu of BAT files in Windows 10

Discus and support Add Open with to Context Menu of BAT files in Windows 10 in Windows 10 Tutorials to solve the problem; How to: Add Open with to Context Menu of BAT files in Windows 10 How to Add or Remove Open with Context Menu to BAT files in Windows 10 A .bat... Discussion in 'Windows 10 Tutorials' started by Brink, May 1, 2016.

  1. Brink
    Brink New Member

    Add Open with to Context Menu of BAT files in Windows 10


    How to: Add Open with to Context Menu of BAT files in Windows 10

    How to Add or Remove Open with Context Menu to BAT files in Windows 10


    A .bat file is a batch file that consists of a series of commands to be executed by the command line interpreter, stored in a plain text file.

    The Open with context menu allows you to choose an app to open the file with.

    By default, .bat files in Windows do not have "Open with" in their right click context menu. Adding "Open with" to the context menu of .bat files will make it easy for users to be able to quickly choose an app (ex: text editor) they want to open/edit the batch file with on demand.

    This tutorial will show you how to add or remove Open with to the context menu of BAT files for all users in Windows 10.

    You must be signed in as an administrator to be able to add or remove the Open with context menu for BAT files.


    EXAMPLE: Open with added to BAT context menu

    Add Open with to Context Menu of BAT files in Windows 10 [​IMG]




    Here's How:

    *note The .reg files below are to add or remove the registry key in red below.

    HKEY_CLASSES_ROOT\batfile\shell\Open with


    1. Do step 2 (add) or step 3 (remove) below for what you would like to do.


    2. To Add "Open with" to Context Menu of BAT files
    A) Click/tap on the Download button below to download the file below, and go to step 4 below.

    Add_Open_with_to_BAT_context_menu.reg

    Download

    3. To Remove "Open with" from Context Menu of BAT files
    *note This is the default setting.
    A) Click/tap on the Download button below to download the file below, and go to step 4 below.

    Remove_Open_with_from_BAT_context_menu.reg

    Download
    4. Save the .reg file to your desktop.

    5. Double click/tap on the downloaded .reg file to merge it.

    6. When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

    7. You can now delete the downloaded .reg file if you like.


    That's it,
    Shawn


    Related Tutorials

    :)
     
    Brink, May 1, 2016
    #1

  2. Custom context menu entries

    So, just throwing this out there, in case somone knows.

    I have added a custom context menu entry for the program rightload, since by default the menu is broken in vistax64.

    It works pefect with single files, but when I select mutiple files and try to open, I get mutiple instances of the program (which makes sense), here is my entry:

    C:\Program Files (x86)\Rightload\Rightload.exe --server=1 --autostart %1

    So the %1 passes the filename to the program, and when I select multiple files it is just opening multiple instances of rightload each with a different file.

    What I'd like to do is be able to pass a list of the files selected to the program. Since I know it is capable of uploading multiple files from the context menu, all in one instance.

    So, is there something I can pass besides %1 that will do this? I have looked around and can't seem to find an answer anywhere... *Frown Add Open with to Context Menu of BAT files in Windows 10 :(
     
    ArmoredCavalry, Oct 26, 2019
    #2
  3. Ahhzz Win User
    Windows 10 Tweaks

    Pressing “Windows+Pause Break” (it’s up there next to scroll lock) opens the “System” Window.

    Windows 10: In the new version of Windows, Explorer has a section called Quick Access. This includes your frequent folders and recent files. Explorer defaults to opening this page when you open a new window. If you’d rather open the usual This PC, with links to your drives and library folders, follow these steps:

    • Open a new Explorer window.
    • Click View in the ribbon.
    • Click Options.
    • Under General, next to “Open File Explorer to:” choose “This PC.”
    • Click OK


    credit to Lifehacker.
     
    Ahhzz, Oct 26, 2019
    #3
  4. Add Open with to Context Menu of BAT files in Windows 10

    Open .bat files with Notepad in Windows 10

    What you need to do is probably to add the "Edit" action as a new context option to ".bat" file; since if you changed the Default Program" as suggested, you won't be able to run the BAT file when double (or single) clicked.

    You can use the little utility called "Types" (I believe it's a freeware.) to define all sorts of actions to any file types. It works since XP till Win 10.

    BTW, Win10 does not allow a BAT file to be assigned as an "Open With..." executor. "Types" actually came to rescue the situation. Besides the flat and blurry rendering of the dialogs, there are also all kind of annoying short-comings in Win 10. Not sure
    what M/S is trying to pull off...
     
    Postino_888, Oct 26, 2019
    #4
  5. drabelink Win User
    OpenWith context menu issues (changes compared to Win7)


    Hi,

    Since Windows 8 and now also on Windows 10 I have trouble getting the "old" way of creating the "Open With" context menu working as before.

    On all previous Windows versions (up to Win8) it was easy to assign multiple applications to handle a specific file extension.
    I really need to assign custom applications to extensions to get my productivity efficient.

    Let me make an example:

    I use several versions of a development tool which opens .apt files.
    To develop on different projects using different dev environment versions I created for each environment a .bat file.
    This bat file sets the correct PATHS, displays some info in the console and starts the needed dev environment version and opens the .apt file.

    It was easy to assign those .bat files to .apt extension, having a list of bat files in the context menu of "Open with"

    So:

    Test.apt
    ->
    Open with...
    StartDev_Version3.bat
    StartDev_Version4.bat
    StartDev_Version5.bat
    StartDev_Version6.bat

    So right clicking on a .apt file gives me the "Open with" option which can be expanded and having the bat files listed.

    How to setup this list previously?

    - Right click .apt file
    - Select Open With menu
    - Choose default program
    - In the dialog, select choose another program
    - Browse to the bat file and select
    - Uncheck the "always use this program to open this file"
    - Press ok

    The bat file is then executed and the .apt file is opened in the correct Dev version.

    Afterwards when right clicking .apt file again, the previously selected bat file is now listed straight under the Open With menu as an item and can be selected immediately (no need to open the dialog to select the bat file).

    This worked flawlessly and the list to be created was point and click.


    On Windows 8 and now on Windows 10 this procedure to customize the list is not working.

    1) The popupmenu under "Open with" does not get new items, even when the "Always open with this program" was checked.
    The list keeps empty. I must select "Choose default program" to open the dialog.
    2) The previously selected bat file is not listed in "Recommended programs". So even the annoying extra click is not enough.
    3) I then must go to "Other installed programs", but the bat file is not even listed there
    4) I then must press the browse button to relocate the bat file again

    This workflow is annoyingly inefficient.

    I searched these forums and other places on the web and found several info on registry keys for applications, extensions, protocols etc etc. And also some tools to edit the OpenWith list.
    These tools actually seem not to work. There is not one tool which offers a clear editor to add/remove the items in the popup list of OpenWith. I can remove stuff or hide/disable it, but not add a completely new entry.

    Also manually editing the registry is a pain. Somehow the settings are not taken into account.

    I can not imagine others do not have this issue. There must be a change starting from Win8 which prevents to customize the OpenWith like we can in Win7.

    I hope that this issue can be solved in this thread, even do manual registry stuff. I must have the old workflow working for a nice efficient productivity.

    Question:
    Is there a tool which actually is able to customize (add/hide/delete) the complete OpenWith feature?
    So editing the popup list, edit the recommended programs, edit the installed programs and customize the overall features?

    (if there is not a tool, a tip for me to create one !!!)

    But the registry is too complicated and spread over to give me a clear view how to setup my popuplist even manually.
    Nothing works.


    I'm looking for a clear step by step way to:

    - Add a new file extension
    - Register any application / bat file
    - Setup the default application for that filetype using bat file
    - Configure multiple bat files to the file type and have them listed in the popup list

    Any help is greatly appreciated !!
     
    drabelink, Oct 26, 2019
    #5
  6. How to fix 'Open with' on file context menu.


    Only if things are working correctly. Here's a few things I notice:

    1. When I go into 'Default Programs' and change .txt files to use another program I do get a list of other programs that I can use to open the .txt file. This list is what should appear on the 'Open with' context menu in File Manager.

    2. The extensions with the 'Open with' problem also don't have 'Open' on the context menu. It should be the first entry on the list. I can still click on the file and it will open with he default program.

    Got to be something in the Registry. I thought I would find under .txt in the Registry an Openwith List with wordpad and notepad. But there isn't any even on my VM Windows where 'Open with' works fine.
     
    streetwolf, Oct 26, 2019
    #6
Thema:

Add Open with to Context Menu of BAT files in Windows 10

Loading...
  1. Add Open with to Context Menu of BAT files in Windows 10 - Similar Threads - Add Open Context

  2. Add or remove Open With on Context Menu for BAT or URL files in Windows 11/10

    in Windows 10 News
    Add or remove Open With on Context Menu for BAT or URL files in Windows 11/10: [ATTACH]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...
  3. Add option to context menu to open file type

    in Windows 10 Support
    Add option to context menu to open file type: By default, Windows will open a MIDI file with Windows Media Player on double-click. This is fine. However, I'd like to add the option to open MIDI files to the context menu (right click). As it is, to open a MIDI file with MuseScore (my current preferred software), I have...
  4. Trying to add a Bat file to the start menu.

    in Windows 10 Support
    Trying to add a Bat file to the start menu.: Hi there. I created the file google.bat with the following content: start "" "Google" What I want to do is add this file to the start menu. The objective is to be able to execute it with Cortana by saying "hey Cortana, open google". If I add the file into...
  5. Open Location context menu - Add or Remove in Windows 10

    in Windows 10 Tutorials
    Open Location context menu - Add or Remove in Windows 10: How to: Open Location context menu - Add or Remove in Windows 10 Add or Remove 'Open file location' and 'Open folder location' Context Menu in Windows 10 When you right click or press and hold on a shortcut of a file, shortcut of a folder, file or folder in search...
  6. Add or Remove Open with Context Menu to URL files in Windows 10

    in Windows 10 Tutorials
    Add or Remove Open with Context Menu to URL files in Windows 10: How to: Add or Remove Open with Context Menu to URL files in Windows 10 How to Add or Remove Open with Context Menu to URL files in Windows 10 A .url file is an Internet shortcut that opens with your default web browser. The Open with context menu allows you to choose...
  7. Open with Notepad context menu - Add or Remove in Windows 10

    in Windows 10 Tutorials
    Open with Notepad context menu - Add or Remove in Windows 10: How to: Open with Notepad context menu - Add or Remove in Windows 10 How to Add or Remove 'Open with Notepad' Context Menu in Windows 10 Adding "Open with Notepad" to the context menu of all files will allow you to quickly open that file with Notepad without setting...
  8. Add or Remove Open with Context Menu in Windows 10

    in Windows 10 Tutorials
    Add or Remove Open with Context Menu in Windows 10: How to: Add or Remove Open with Context Menu in Windows 10 How to Add or Remove Open with Context Menu in Windows 10 The Open with context menu allows users to choose an app to open a file with. This tutorial will show how to add or remove the Open with context menu...
  9. Add VBScript File to New Context Menu in Windows 10

    in Windows 10 Tutorials
    Add VBScript File to New Context Menu in Windows 10: How to: Add VBScript File to New Context Menu in Windows 10 [img] Information A .vbs file is a VBScript (Visual Basic Script) file written in the VBScript scripting language that can be executed within Windows or Internet Explorer via the Windows-based script host...
  10. Add Open or Close OneDrive Context Menu in Windows 10

    in Windows 10 Tutorials
    Add Open or Close OneDrive Context Menu in Windows 10: How to: Add Open or Close OneDrive Context Menu in Windows 10 How to Add a OneDrive Open or Close Context Menu in Windows 10 OneDrive is a cloud-based storage service where you can view, browse, upload, and share the files you saved online to OneDrive. By default,...