I am just doing some automating stuff and I'm a bit stuck. I have a program which does not offer any commandline operations (I want to start it with a script), but it offers a context menu in the windows explorer. If I could just "invoke" that or imitate a click or something like that, then the problem would be solved.
So I browsed the web for any solution - and found one: A short script for Powershell, which does exactly what I need.
$o = new-object -com Shell.Application
$folder = $o.NameSpace("c:\temp")
$file=$folder.ParseName("test")
$file.Verbs() | %{ if($_.Name -eq ' ... name of the context menu entry ...') { $_.DoIt() } }
There is only one problem with it: it only works with context menu entries, which are not in submenus. Unfortunately the needed context menu entry is in such submenu.
Does anybody have any suggestions? I am open for any kind of solution:
- Edit the powershell script, so it works also with entries in submenu
- Edit the registry, so the entry is outside of the menu (I'm afraid this might not work, because it is implemented with a COM module in a DLL and I cannot change anything (?) )
- Any other solution: Thirdparty application ...
Thanks a lot!
hkey classes rootfor "... name of the context menu entry ..." and you will find theMUIVerbregistry setting, the key where that is will also have a command or GUID / DLL or some info we need. Here is an example of what you might find when you search - superuser.com/questions/686379/… Report back the contents of the registry at your key and I can give better answer. - Knuckle-Dragger