Wednesday, February 22, 2012

Open files faster - Add an entry to the File explorer's context menu



 I find the need to open files in an editor (PSPad) many times. When I right click on a file the context menu always displays "PSPad" for me and this is how I did it:


  1. Open "regedit".
  2. Navigate to "HKEY_CLASSES_ROOT\*\shell".
  3. Create a new key (Eg: PSPad). This will be the name that you see in the context menu.
  4. Create a new key under it and name it "command" (Now I have "HKEY_CLASSES_ROOT\*\shell\PSPad\command").
  5. Double click on the "Default" string under "command" (On the right hand page) and modify it's value as follows:
                 "<path_to_exe>" %1
    For me it looks like this:

Note: "%1" indicates the first parameter to be passed to the exe file. In most cases it is the name of the file that you want to open.