Copying Folder Location to registry using Windows Context Item
-
Thursday, November 29, 2012 4:36 PM
Hello Everyone !
Could you please suggest me some ideas to overcome my thread below :
Basically, I had created an application that calculates MD5 hash of files, I had also added an item to Windows Context Shell so user can right click any file and click that menu to calculate the md5 hash for that selected file.
I had created that menu, but struggling on how to copy the file path to my application when user select that menu under right click.
Please help me to resolve this.
Thanks
All Replies
-
Thursday, November 29, 2012 4:42 PM
-
Thursday, November 29, 2012 4:44 PM
Thanks for your reply Hashim
I am still new to programming, could you please explain to me further.
-
Thursday, November 29, 2012 4:53 PM
Sure.
Following code can guide you
' Sample for the Environment.GetCommandLineArgs method Imports System Class Sample Public Shared Sub Main() Console.WriteLine() ' Invoke this sample with an arbitrary set of command line arguments. Dim arguments As [String]() = Environment.GetCommandLineArgs() ' arguments(0) contains the filepath... ' you can use this to create the MDH hash End Sub 'Main End Class 'Sample
Also check this thread http://social.msdn.microsoft.com/forums/en-us/vblanguage/thread/881711FF-C93F-4D44-92AB-540733EC96E2A.m.a.L Hashim

My Blog - Dot Net Goodies
- Marked As Answer by Shanks ZenMicrosoft Contingent Staff, Moderator Monday, December 10, 2012 4:56 AM
-
Thursday, November 29, 2012 4:56 PMThanks Hashim, I am checking the thread thoroughly
-
Thursday, November 29, 2012 5:02 PMI got that Hashim, but could you suggest me, how can I see the filepath as a string value in a label or a textbox ?
-
Thursday, November 29, 2012 5:16 PM
Ok. Whenever the user click "Create MDH Hash"... from windows explorer context menu..your application should open up with the filename in a label?
Here is the thread that discuss something similar
http://www.dreamincode.net/forums/topic/120447-explorer-context-menu/
In your case, you should create your application as a Windows Forms Applications. Add a Label/Textbox control.
Update the control using following code
Label1.Text = My.Application.CommandLineArgs(0)
A.m.a.L Hashim

My Blog - Dot Net Goodies
- Marked As Answer by Shanks ZenMicrosoft Contingent Staff, Moderator Monday, December 10, 2012 4:56 AM

