Add program into the right click of every file/folder

Hi,

I am programming this in VB but it should be relative in all languages as it is just registry changes as far as i understand.

I have managed to add my program into the right click of every file by adding a key to:
HKEY_CLASSES_ROOT
*
Shell
RunProggy (what ever you want to appear on the right click)
Command (in the default of this new key add in what you want to happen when you click.. I.e "Notepad.exe %1" would open up the right clicked file in notepad)

So using this location i am able to boot up my program, and using the "Command" function detect which file was right clicked on. Simpe huh!
***BUT***

It does not detect when i right click on multiple files which is quite important. Does anyone know how to get this working?

Also does anyone know how i can my link to the right click of every folder?

Thanks

Ralph

Live4SurfAsked:
Who is Participating?
 
Robberbaron (robr)Connect With a Mentor Commented:
SendTo works on folders.
Its not hard. Create a shortcut to your App on the desktop and then move that shortcut to the Windows\SendTo folder.


No ideas on Folder rightclick. I search my registry for app items that are on right click but no sign of an easy value to add.
0
 
Robberbaron (robr)Commented:


i think Notepad %1 %2 %3 %4 %5 should work (for 5 files at least)
0
 
Robberbaron (robr)Commented:

Batch files can only handle parameters %0 to %9

%0 is the program name as it was called,
%1 is the first command line parameter,
%2 is the second command line parameter,
and so on till %9.
 see http://www.robvanderwoude.com/parameters.html

But an actual application should be able to read any number of parameters.
But the problem i found is the 256character commandline limit.
Because the files are passed including their full path name.This is very useful/necesary but limits the number of files that can be passed.
And it truncates characters after 256, so hard to tell if any missing.
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
Robberbaron (robr)Commented:
actually i had last tried this under 95/98

NT/2000 have 4096 and appears XP limit is 8190 so should be much less a problem !
0
 
Robberbaron (robr)Commented:
send to is another way.
Add a shortcut to Notepad %1 %2 %2 (or whatever) to your 'send to' folder: C:\WINDOWS\SENDTO.
This shortcut will now appear in the 'Send To' menu that appears when you right-click on a file.
0
 
Live4SurfAuthor Commented:
Thanks so much! The Notepad %1 %2 %3 %4 %5 work like a charm. I have looked at the send to, but it is not as obvious, so i prefer running it this way around.

Any ideas on adding something to the right click of a folder?

Thanks again, Really appreciated

Ralph
0
 
Live4SurfAuthor Commented:
Sorted - Same as before but instead of using the folder "*" you use (Obviously -.-) the folder "Folder". And in there is all of the other right click things, like "Open".

Thanks for your help robberbaron
0
All Courses

From novice to tech pro — start learning today.