views:

82

answers:

2

Hi,

I have done this before but for the life of me cant remember how to do this... In my explorer context menu i added a new entry (go to regedit...go to HKEY_CLASSES_ROOT...bla bla bla)... Nou when i click on my option i want to pass in the file path, file name, those kind of things to my application...and then use it there?

Anybody??

A: 

You should open a window from the context menu and get your data there to pass to your application.

Tony
+1  A: 

The default value of the .ext\shell\open\command key should contain the path to your .exe with the "%1" argument. Explorer substitutes that with the full path to the file. Which you can read in your .exe through the Main() method argument or Environment.GetCommandLineArgs().

Hans Passant