
Add application to Windows 95 Explorer Right Mouse Menu
Quote:
> I want to add my application to the Windows 95 Explorer menu that comes
up
> when you right mouse click on a folder / file. I would like to have the
> selected folder(s) passed to me as parameters. This would work similar
to the
> WinZip menu option.
The 'good' way it should be done is using OLE interfaces, and this is
rather tricky in VB. However, there is some simple solution, and it's the
same as if you're adding context menu commands manually:
1. Open any folder, select View->Options->File Types.
2. Select 'Folder' file type, press Modify.
3. Press 'Add Action', enter the name of action (say, 'Run MyApp') and
something like 'c:\myapp.exe "%1" ' as command line (%1 denotes the item
currently selected, and quotes are necessary for proper handling of
folder/file names with embedded spaces).
4. Click OK several times.
Now the context menu for folder shall contain the new item, clicking which
will launch MyApp.exe with the folder name as argument. Then, open Registry
Editor and search for 'Run MyApp'. Note all keys that were thus added and
their values. Now you can do the same programmatically using API calls for
registry editing.
If you wish to add the same menu for some files, repeat the same for all
file types of your choice. However, if you wish to apply this menu to _all_
files, it's bad way. There should be some key in registry which applies a
menu to all file types, but I can't recall it right now :(.
--
EugeneT