Add open with "program" to context menu

bignose956

Well-Known Member
#1
When I right click a file, the little menu that pops up has an option that says "Scan with Antivirus Program". This option will basically open the file with my antivirus program. What I am trying to do, is to add an option in this dropdown menu that lets me open it with a specific program, without having to click the "Open With" button.

For example, in my attachment, there is a 7-Zip option that lets the user open the file in 7-Zip. Can I add an option that will let me open it in Java or Paint.net?
 


Attachments

Neemobeer

Windows Forum Team
Staff member
#2
Yes, you can add that for either all users (Use HKEY_CLASSES_ROOT keys) or for just your user use the HKEY_CURRENT_USER)
I'll just you the all users key HKEY_CLASSES_ROOT
  • Open regedit and expand HKEY_CLASSES_ROOT
  • Expand the * key
  • Expand the shell key
  • Right click on shell and select "New > Key"
  • Name this whatever you want, it can be used as the text in the menu or I typically use it to order the menu entries so if I want a entry at the bottom for say opening a log file I would name the key "zzzzOpenLog"
  • Click on the newly created key and edit the (Default) value and enter the text you want it to have so "Open Log" for my example
  • With the zzzzOpenLog key selected you can add optional values like
    • Position (type: string) and have Top or Bottom there may be others
    • Icon (type: string) path to the .exe you want to use for the icon on the menu
  • Now right click on zzzzOpenLog and select New > Key
  • Name it command
  • Select command and edit the (Default) value with the full path to the exe you want to launch plus the argument to pass it
    • Example "C:\Windows\System32\mspaint.exe" "%1"
    • This would open paint and %1 is always the file you are clicking on
 


bignose956

Well-Known Member
#3
Yes, you can add that for either all users (Use HKEY_CLASSES_ROOT keys) or for just your user use the HKEY_CURRENT_USER)
I'll just you the all users key HKEY_CLASSES_ROOT
  • Open regedit and expand HKEY_CLASSES_ROOT
  • Expand the * key
  • Expand the shell key
  • Right click on shell and select "New > Key"
  • Name this whatever you want, it can be used as the text in the menu or I typically use it to order the menu entries so if I want a entry at the bottom for say opening a log file I would name the key "zzzzOpenLog"
  • Click on the newly created key and edit the (Default) value and enter the text you want it to have so "Open Log" for my example
  • With the zzzzOpenLog key selected you can add optional values like
    • Position (type: string) and have Top or Bottom there may be others
    • Icon (type: string) path to the .exe you want to use for the icon on the menu
  • Now right click on zzzzOpenLog and select New > Key
  • Name it command
  • Select command and edit the (Default) value with the full path to the exe you want to launch plus the argument to pass it
    • Example "C:\Windows\System32\mspaint.exe" "%1"
    • This would open paint and %1 is always the file you are clicking on
It worked! Thank you! (again)

BTW, are you the only member beside me? Because you seem to be the only person that ever makes new threads, or replies to mine.
 


Neemobeer

Windows Forum Team
Staff member
#4
I'm just on here a lot and I have alerts for certain forums.
 


bignose956

Well-Known Member
#5
Position (type: string) and have Top or Bottom there may be others
Do you happen to know any of the other possible values for Position?
 


Neemobeer

Windows Forum Team
Staff member
#6
Looks like top and bottom are the only ones. Found this article that has a lot more details. You can also make sub menus. I believe the reg value is MUIVerb Creating Shortcut Menu Handlers (Windows)
 


This website is not affiliated, owned, or endorsed by Microsoft Corporation. It is a member of the Microsoft Partner Program.