Saturday, 14 September 2013

getting the folder path of the last location i right clicked

getting the folder path of the last location i right clicked

i created a right click shortcut (in windows right click menu) for my
application, and i want to get the folder path of the right clicked
location how do i do it?
my code to create a shortcut :
RegistryKey rKey =
Registry.ClassesRoot.OpenSubKey("Directory\Background\shell", true);
String[] names = rKey.GetSubKeyNames(); foreach (String s in names) {
System.Windows.Forms.MessageBox.Show(s); } RegistryKey newKey =
rKey.CreateSubKey("Create HTML Folder"); RegistryKey newSubKey =
newKey.CreateSubKey("command"); newSubKey.SetValue("",
"C:\Users\Aviv\Desktop\basicFileCreator.exe " + "\"" + "%1" + "\"");
newSubKey.Close(); newKey.Close(); rKey.Close();

No comments:

Post a Comment