Click here to Skip to main content
15,911,711 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
Hi,

I want to know how to add my app (it's name is JPG2LV.exe) to a shell folder in context menu?

My application is reading files (*.jpg) inside each of the selected folders and shows them in a listview.

When I added it using registry it shows.

When I select multi-folders it opens many (JPG2LV.exe)
But if I make my app (JPG2LV.exe) only one single in process, it crashes!

So please if anyone know how to code it.

Thanks
Posted
Updated 14-Aug-11 0:19am
v2
Comments
Sergey Alexandrovich Kryukov 31-Jul-11 23:32pm    
Not clear. What behavior do you want; how you tried to register your application in the registry? There is not such thing as
"crash". Do you have exception? Where is its report?
--SA
Leecherman 1-Aug-11 9:24am    
Here is the registry entries :

<pre>

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Folder\shell\JPG2LV]
@="Run JPG2LV"
"Icon"="\"D:\\JPG2LV\\JPG2LV.exe\""

[HKEY_CLASSES_ROOT\Folder\shell\JPG2LV\command]
@="\"D:\\JPG2LV\\JPG2LV.exe\" "%1\""

</pre>

when i select only one folder and run JPG2LV from context menu it's work OK, but when i select more folders ( example : 5 folders ) it's open a 5 JPG2LV
And when i check ( Make single instance application ) JPG2LV open and work but a lot of crash appears!

And when i used ( Configure FileMenu Tools ) and uncheck ( Make single instance application )
it's open only one JPG2LV and work great without any problems.

Please Any idea!
Maciej Los 13-Aug-11 18:52pm    
Show me your code where you are reading command line values.
Dalek Dave 14-Aug-11 6:20am    
Edited for Grammar, Spelling, Syntax and Readability.

1 solution

Did you try to read command line values?
VB
Dim cmdp As String = String.Empty

For Each cmdp In My.Application.CommandLineArgs
    MsgBox(cmdp, MsgBoxStyle.Information, "CommandLine arg.")
Next
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900