Tricky windows shell/registry/.Net question

kepler

New member
I want to add an option to the Windows right click file context menu for certain file types (though * would be fine to begin with) that would pass the file's path to my program. This should be easy but I'm having trouble getting it set up.

I know I can add a key in HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers to add a ref to a key in HKEY_CLASSES_ROOT\CLSID which refers to the path of the exe but that doesn't add the context menu option.

I tried creating a new key called "shell" in HKEY_CLASSES_ROOT\* which refers directly to the exe, this does put the option in the right click menu but it still doesnt work,just gives me a "no app associated with this file" error when I click on the option.

HEP!
 
Woohoo I fixed it! Changing

HKEY_CLASSES_ROOT\*\shell\Upload\New Key#1\
with string value "C:\myapp.exe" %1

to

HKEY_CLASSES_ROOT\*\shell\Upload\Command\
with string value "C:\myapp.exe" "%1"

Seems to have done the trick.
 
Darnit! I wanted to rep ya for that one, was a good find. But I gotta spread some around before repping ya again. IOU +rep :D
 
Back
Top