12

How do I go about adding a program to every files right click "open with..." list in Windows 7?

For example; I like to regularly view files in HxD hexeditor; there are various types of files I do this for. How do I add to every single file type on the system that HxD would be in every single files "open with..." menu?

7 Answers 7

8

Short answer is: with great difficulty.

Longer answer:

In the registry under HKEY_CLASSES_ROOT you'll find an entry for each registered file extension. You need to add a key called "OpenWithProdids" to each file extension that you want to handle. Within this key you then need a string value where the name is the ProgId for the HxD.

There is a much easier way, however. If you put a shortcut to HxD in C:\Users\\AppData\Roaming\Microsoft\Windows\SendTo, then for ANY file in the system you can right-click, and then pick Send To->HxD from the context menu.

3
  • Thanks for the reply; was hoping that I didn't have to go through that long process
    – abc123
    May 27, 2011 at 1:23
  • you can have shorter process by using a tool. Check my post below ;) May 28, 2011 at 20:49
  • And if you put a shortcut to the SendTo folder in the SendTo folder, you can send a program to the SendTo folder, and it'll put a shortcut there. (The easiest way to do that is to create the shortcut on the desktop, then move it into the SendTo folder.) Saves you from always having to navigate to the SendTo folder to put shortcuts in there.
    – RobH
    Feb 10, 2016 at 17:27
2

Put the following in a text file and name it something like Add HxD to Context Menu.reg, update the paths, save it, and run it.

REGEDIT4

[HKEY_CLASSES_ROOT\*\Shell\HxD]
@="&HxD"

[HKEY_CLASSES_ROOT\*\Shell\HxD\Command]
@="\"C:\\Program Files\\HxD\\HxD.exe\" \"%L\""
0
1

You can use the ShellExView tool for this.

1
  • As far as I am aware, ShellExView only allows you to enable/disable existing menus; it does NOT allow you to create new ones. The answer by @Synetech is the correct way to add new ones.
    – Alex
    Nov 5, 2015 at 5:22
0

This likely is not correct, but something in this manner should work.

 REGEDIT4

 [HKEY_CLASSES_ROOT\HxD]

 [HKEY_CLASSES_ROOT\HxD\shell]

 [HKEY_CLASSES_ROOT\HxD\shell\open]

 [HKEY_CLASSES_ROOT\foo\shell\open\command]
 @="\"C:\\Program Files\\Application\\HxD.exe\" \"%1\""

Doing (something like) this should add a context menu (but that may not actually be there in what I've posted?) that should display for every file type, allowing you to open the file with HxD.

Vim does this providing an "Edit with Vim" context menu for all file types.

(There are other Registry keys where the same sort of thing can also be accomplished.)

Someone more knowledgeable should be able come up with the actual working solution.

1
  • These are the types of Registry entries that Vim makes, pastebin.com/a1ydzniP. Thinking it should be able to be adapted, simplified for other apps.
    – therube
    May 28, 2011 at 17:03
0

Default programs list appears when opening unknown file type. If file already has association then you must go to the 'Open With' menu. Expand it to see full list of default programs. Snippet from batch script that adds foobar to list of default programs:

reg add "HKCU\Software\Classes\*\OpenWithList\foobar2000.exe" /f
reg add "HKCU\Software\Classes\Applications\foobar2000.exe\shell\open\command" /ve /d "\"%SCRIPTDIR%media\foobar2000\foobar2000.exe\" \"%%1\"" /f
1
  • 1
    Have you tested this? My experience on Windows 7 is that it doesn't work. I have a pretty good idea why as well, so it isn't surprising. What's surprising is that many program do register there, in vain.
    – Norswap
    Jan 10, 2015 at 1:02
0

This will create a new "Open with Notepad" item on your context menu. "Open with" is more intuitive (and more correct) than "Send to". And it does not require drilling down to a sub-menu.

  • Open regedit, with Administrative privileges.
  • Browse to HKEY_CLASSES_ROOT*\shell
  • Create a new key under shell, calling it “Open with Notepad”
  • Create a new key below that one called “command”.
  • Double-click on the (Default) value in the right-hand pane and enter in the following:

    notepad.exe %1

http://www.howtogeek.com/howto/windows-vista/add-open-with-notepad-to-the-context-menu-for-all-files/

0

This works in Windows 8.1 so not sure about Windows 7. I dont know where your path is to HxD so Ive just put an example below. Replace the application location below and in Applications\HxD.exe replace HxD.exe with the name of the executable that will be run.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Applications\HxD.exe]

[HKEY_CLASSES_ROOT\Applications\HxD.exe\shell]

[HKEY_CLASSES_ROOT\Applications\HxD.exe\shell\edit]

[HKEY_CLASSES_ROOT\Applications\HxD.exe\shell\edit\command]
@="C:\\Program Files (x86)\\HxD\\HxD.exe %1"

[HKEY_CLASSES_ROOT\Applications\HxD.exe\shell\open]

[HKEY_CLASSES_ROOT\Applications\HxD.exe\shell\open\command]
@="C:\\Program Files (x86)\\HxD\\HxD.exe %1"

You must log in to answer this question.