Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make a .reg file to add shortcuts in right click menu

My problem is about manipulation about Windows Registry (using windows 7).

Let's see the following screenshot :

enter image description here

I right cliked on an AVI file, and I have some options. First one I want to talk : "Lire avec VLC" (english : "Read with VLC").

The VLC software adds, somewhere in the registry, that AVI files are associated with this option.

You can also see "7-zip" options, with an arrow for suboptions (Add to archive, Compress with...) 7-zip added this to ALL type of files.

I would like to add my own shortcuts in the right click/context menu. How can I add an option like VLC, specific to a file type? How can I add a global options like 7-zip, and how to add submenu options like 7-zip does?

I'd like to write a .reg file that can do it.

like image 282
Fvirtman Avatar asked Sep 17 '25 15:09

Fvirtman


1 Answers

You can add an option for a specific file type like this

Windows Registry Editor Version 5.00
; HKEY_CLASSES_ROOT\.avi reveals WMP11.AssocFile.AVI
[HKEY_CLASSES_ROOT\WMP11.AssocFile.AVI\shell\hello\command]
@="hello.exe"

You can add a cascading menu when you right click the background

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\hello]
"SubCommands"="world"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\world]
@="world"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\world\command]
@="world.exe"

Note: you might need to use full paths, if your programs are not on the PATH.

cascading menu

Your Menu: Add Programs In Right-Click Context Menu

like image 94
Zombo Avatar answered Sep 20 '25 05:09

Zombo