How to fetch the value on the click of Context Menu Item and pass the same as a parameter to the executable. | social.msdn.microsoft.com | ?forum=csharpgeneral | Chrome

PHOTO EMBED

Tue Feb 23 2021 18:17:46 GMT+0000 (Coordinated Universal Time)

Saved by @Butters1143 #c# #shell #registry #contextmenu

RegistryKey key;
key = Registry.ClassesRoot.CreateSubKey(@"*\shell\UniSendTo");
string MUIVerb = "Universal Send To";
string ExtendedSubCommandsKey = @"*\shell\UniSendTo\MainMenu";         
key.SetValue("MUIVerb", MUIVerb);
key.SetValue("ExtendedSubCommandsKey",ExtendedSubCommandsKey);
RegistryKey  key1 = Registry.ClassesRoot.CreateSubKey(@"*\shell\UniSendTo\MainMenu");
key1 = Registry.ClassesRoot.CreateSubKey(@"*\shell\UniSendTo\MainMenu\shell");
RegistryKey  key2 = Registry.ClassesRoot.CreateSubKey(@"*\shell\UniSendTo\MainMenu\shell\HomePC");
string MUIVerb1 = "Home PC";
key2.SetValue("MUIVerb",MUIVerb1);
string ip = "192.168.1.22";
key2.SetValue("IP",ip);
RegistryKey key3 = Registry.ClassesRoot.CreateSubKey(@"*\shell\UniSendTo\MainMenu\shell\HomePC\command");
key3.SetValue("",@"H:\ERT\FileTransfer.exe");
content_copyCOPY

https://social.msdn.microsoft.com/Forums/en-US/0397ed6f-ce8f-4bfa-9934-3246d374c128/how-to-fetch-the-value-on-the-click-of-context-menu-item-and-pass-the-same-as-a-parameter-to-the?forum