PDA

View Full Version : How do I add my program to the right-click menu??



ramsejp
10-30-2001, 07:40 PM
Hi,

I want to make it so that when I right-click any file, an option is there to run whatever program I want passing it the name of the file that was right-clicked. How do I do that? I'd also like to be able to have the same thing pop up on various folders like the recycle bin and outlook express mail folders.

Thanks,
Jason

reghakr
10-30-2001, 10:43 PM
You're not asking for much, are you /images/forums/icons/smile.gif

Try this freeware called <a target="_blank" href=http://www.zdnet.co.uk/pcmag/product/source.html>RunPlus</a>

reghakr

Mosaic1
10-30-2001, 11:52 PM
Here's how other programs do that. This will add your program to all files menus:
Go to the registry and navigate to:
HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers

Create a subkey and name it after your program. In the right pane, modify the default value to the CLSID of your program.

Under HKEY_CLASSES_ROOT\CLSID\{your CLSID}
default value will be the name of the program
Then add a subkey named InProcServer32
It's default value should be the path to the DLL which is going to be used
Then create a string value named ThreadingModel and modify it . the value data should be Apartment

That's how Winzip for example does it.
I think it must be in the DLL and how it is written. But I am not a programmer and don't know the details on writing a Dll

To add your Program to the context menu of the Folders you would go to:
HKEY_CLASSES_ROOT\Folder\shellex\ContextMenuHandle rs
And perform the same procedure.