New Bottle Old Wine: Shell Context Menu

Life became very easy long back when windows offered Context menu on its shell objects like Files, Folders etc… Generally IContextMenu and IShellExtInt are used along with COM implementation to get the context menu functionality. However Registry entry can also be used to achieve this.

@=”Open Command Window Here”

@=”cmd.exe /k \”cd %L\””   are 2 very useful registry entries to attach new ‘Open Command Window Here’ command with all Folders.


Similarly  to achieve something on text Files,

[HKEY_CLASSES_ROOT\txtfile\shell\<My Command Text>\command]

But what if you wanted the files command to work on selected set of files only OR say only on a particular file like XYZ.Txt only?

[HKEY_CLASSES_ROOT\.txt\shell\<My Command Text>]

this entry in registry will work on xyz.txt file only.. 

Programming is interesting!!



Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s