1
votes

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!

3
Search hkey classes root for "... name of the context menu entry ..." and you will find the MUIVerb registry 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
I could not find any entry for the context menu. I tried to find information with the tool "ShellExView" and i got the the location of the DLL. Its located in c:\...\NavShExt.dll. I also got the CLSID. I searched in the registry for this key, but I only could find out the version number, not any commands. I think I'm on the right way: I think it is an implementation of the IContextMenu interface (Link to IContextMenu). It offers "invoke" but its actually not really clear how to access these functions? With C++? - user2445254
might be less wild goose chase if you tell us what app + command you are actually trying to run. neuber.com/taskmanager/process/navshext.dll.html - Knuckle-Dragger
Oh sorry. I didnt realize that i did not mention that. It is Norton Internet Security 2014. I want to run a scan. - user2445254

3 Answers

0
votes

Have you looked at WASP from codeplex?

http://wasp.codeplex.com/

0
votes

The command line syntax for many subcommands can be found here.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell
0
votes

you can use AutoHotKey to command based as well as gui based automation including clicking on a specific option.