Location of the "Edit" context menu entry for .reg files

  1.    #1

    Location of the "Edit" context menu entry for .reg files


    So when I edit .reg files, I prefer to edit them with VS Code instead of notepad by default. I notice that .reg files have an "edit" context menu entry that appears when you right click on them, but this context menu entry opens up notepad by default. It tried adding the following key:

    Code:
    Windows Registry Editor Version 5.00[HKEY_CURRENT_USER\SOFTWARE\Classes\SystemFileAssociations\.reg\shell\Edit\command]@="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%1\""
    But this doesn't work like it does for some file extensions (such as .py, for example; this method worked perfectly for .py files) because I'm pretty sure something else in the registry has higher priority than this; the problem is, I don't know what.

    Can somebody please direct me to the registry key that is taking priority over this one for the "Edit" command that appears in the context menus of .reg files? Thanks.
      My ComputerSystem Spec

  2. Berton's Avatar
    Posts : 5,883
    Win10 Home and Pro, Win10 Insider Preview, WinXP Home Premium, Linux Mint
       #2

    Right-clicking a .reg file in File Explorer gives the first 2 items on the context menu of Merge and Edit. Merge is a direct action that requires acceptance and Edit opens Notepad. [Notepad is not a word processor, just a text editor useful for notes, programming and HTML editing, very basic.] Maybe your Default File Associations have been messed with, changed to a different program for a file type?

    This is what a 'normal' .reg file looks like:
    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOT\CABFolder\Shell\RunAs]
    @="Install"
    "HasLUAShield"=""

    [HKEY_CLASSES_ROOT\CABFolder\Shell\RunAs\Command]
    @="cmd /k dism /online /add-package /packagepath:"%1""
    Proper coding is important.
      My ComputerSystem Spec

  3.    #3

    JohnTravolski said: View Post
    So when I edit .reg files, I prefer to edit them with VS Code instead of notepad by default. I notice that .reg files have an "edit" context menu entry that appears when you right click on them, but this context menu entry opens up notepad by default. It tried adding the following key:

    Code:
    Windows Registry Editor Version 5.00[HKEY_CURRENT_USER\SOFTWARE\Classes\SystemFileAssociations\.reg\shell\Edit\command]@="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%1\""
    But this doesn't work like it does for some file extensions (such as .py, for example; this method worked perfectly for .py files) because I'm pretty sure something else in the registry has higher priority than this; the problem is, I don't know what.

    Can somebody please direct me to the registry key that is taking priority over this one for the "Edit" command that appears in the context menus of .reg files? Thanks.
    Did you add any of these options upon installation?

    Click image for larger version. 

Name:	000243.png 
Views:	42 
Size:	16.8 KB 
ID:	197481
      My ComputersSystem Spec

  4. topgundcp's Avatar
    Posts : 2,443
    Ubuntu14.04x64 MintMate17x64 Win10Prox64
       #4

    Under this key below, change the value of Default to vscode instead of Notepad.

    HKEY_CLASSES_ROOT\regfile\shell\edit\command
      My ComputerSystem Spec

  5.    #5

    Also have a look at the instructions shown here:

    Right click on Windows folder and open with Visual Studio Code thisDaveJ
      My ComputerSystem Spec

  6. pepanee's Avatar
    Posts : 1,255
    Windows 10 Professional
       #6

    Consider this solution:

    1) Download Context Menu Tuner (from Winaero - Free small and useful software for Windows)
    2) Open the app. On the left side, select: <Add Custom Item...>
    3) Press the Add > > button
    4) Press Add to specific file type
    5) Type reg in that search box, then press the small box to make a check mark, press OK
    6) For Menu Item Title, type something such as: Edit with Visual Studio Code
    7) For Executable File Path, press the Browse... button and go to the Visual Studio Code's program folder and select the executable file (sorry I don't know which file that is, but you can figure it out from there).
    8) Press the Create button
    9) Try it out. If it works, then that's great! (You can go back to this options box and customize the icon and other settings).
      My ComputerSystem Spec


  7.    #7

    topgundcp said: View Post
    Under this key below, change the value of Default to vscode instead of Notepad.

    HKEY_CLASSES_ROOT\regfile\shell\edit\command
    Thanks, that was all I needed.
      My ComputerSystem Spec


 

Related Threads
Hey there, is it safe to use this approach and resource files in Windows 10 Anniversary? Thanks,
One of our Win10 laptops has a context menu with "Properties" that uses shortcut key "r". The other uses key "o" which conflicts with "open". I have no idea how it got corrupted. Suggested locations in the registry for context menu doesn't list it....
Why I have "Run as Administrator" on all files context menu, it is supposed to be just on executables and batch files, right?
Run as administrator - Add to MSI File Context Menu - Windows 7 Help Forums Is this still applicable for windows 10? I have not yet attempted to do this. In my Downloads folder there are right click options to Install / Repair / Uninstall...
Looking to remove the "pin to start" context menu from Windows 10, I use startmenu replacement and that option is very much in the way. There was a way for win 8.1 Files in Windows 8 But reg files changed, so anyone got a Win 10 version of...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 09:27.
Find Us