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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
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
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

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
Robberbaron (robr)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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows XP

From novice to tech pro — start learning today.