Sveučilište u Zagrebu  |  Filozofski fakultet  |  Služba za informatiku  |  Kutak za korisnike  |  Teme


Windows Shell Context Menus

 

* HKCR refers to HKEY_CLASSES_ROOT registry key.
 
Use shellex\ContextMenuHandlers\ instead of shell\ for dynamic context menu (e.g. implemented via code).
Examples are in the end of this text.
 
Drives

  [HKCR\Drive\Shell\]
  [HKCR\Folder\Shell\]
 
Directory
  [HKCR\Folder\Shell\], odnosno [HKCR\Folder\ShellEx\ContextMenuHandlers\]
  [HKCR\Directory\Shell\]
  [HKCR\Directory\Background\Shell\]
  [HKCR\AllFilesystemObjects\shell\]
 
Files
  [HKCR\<ProgID>\shellex\ContextMenuHandlers\]
  [HKCR\*\shell\]
  [HKCR\AllFilesystemObjects\shell \]
 
For Music folders:
  [HKCR\SystemFileAssociations\Directory.Audio\shell\]
  [HKCR\SystemFileAssociations\Directory.Audio\shellex\ContextMenuHandlers\]
 
For Video folders
  [HKCR\SystemFileAssociations\Directory.Video\shell\]
  [HKCR\SystemFileAssociations\Directory.Video\shellex\ContextMenuHandlers\]
 
For Picture folders
  [HKCR\SystemFileAssociations\Directory.Image\shell\]
  [HKCR\SystemFileAssociations\Directory.Image\shellex\ContextMenuHandlers\]
 
Namespace objects
  [HKCR\Folder\Shell\]
  [HKCR\CLSID\{Namespace-CLSID}\shell\]
 
Shortcuts (.lnk files) and executable files
  [HKCR\lnkfile\shell\]
  [HKCR\exefile\shell\]
 

Example

For a .gju file extension, we want to display GJU on the shell context menu, which would open the a file in the notepad.

For static handlers (e.g. external programs), HKCR should contain a filetype subkey, which should contain a subkey which name is displayed on the context menu, which should contain a 'command' subkey which contains a REG_SZ default value containing a command to be executed (use of quoted full path of program is recommanded, with the addition of  "%L" for a full pathname). Multiple selected files will cause multiple concurrent invocations of the program.

For all file types a key with name "HKCR\*\shell\GJU\command" should be used.

 

komentare molim ovdje