Uma abordagem alternativa para sua referência:
Salveosseguintescomo*.reg
eimporteparaoregistro(adaptadode
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\My Menu] "Icon"="shell32.dll,43" "Subcommands"="" [HKEY_CLASSES_ROOT\*\shell\My Menu\shell\menu1] "MUIVerb"="Text Editor" "SubCommands"="" [HKEY_CLASSES_ROOT\*\shell\My Menu\shell\menu1\shell\item1] "MUIVerb"="Notepad++" [HKEY_CLASSES_ROOT\*\shell\My Menu\shell\menu1\shell\item1\command] @="C:\Program Files\npp\notepad++.exe %1" [HKEY_CLASSES_ROOT\*\shell\My Menu\shell\menu1\shell\item2] "MUIVerb"="Sublime Text" [HKEY_CLASSES_ROOT\*\shell\My Menu\shell\menu1\shell\item2\command] @="C:\Program Files\Sublime Text 3\sublime_text.exe %1" [HKEY_CLASSES_ROOT\*\shell\My Menu\shell\menu2] "MUIVerb"="Audio" "SubCommands"="" [HKEY_CLASSES_ROOT\*\shell\My Menu\shell\menu2\shell\item1] "MUIVerb"="Audacity" [HKEY_CLASSES_ROOT\*\shell\My Menu\shell\menu2\shell\item1\command] @="audacity.exe %1"
Referências
AskVG
Directório Opus Resource Center
Adendo: menu de pseudo-pastas
SalvarcomoC:\copy.js
functionfnCopyHereJ(src,dest){varobjShell=newActiveXObject("shell.application"); var objFolder = objShell.NameSpace(dest); if (objFolder) { objFolder.CopyHere(src); } else { WScript.echo("Invalid Folder: "+dest); } } args = WScript.Arguments; fnCopyHereJ(args(0), args(1));
Importar para o registro
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\My Menu] "Icon"="shell32.dll,43" "Subcommands"="" [HKEY_CLASSES_ROOT\*\shell\My Menu\shell\menu1] "Icon"="imageres.dll,-113" "MUIVerb"="Picture" "SubCommands"="" [HKEY_CLASSES_ROOT\*\shell\My Menu\shell\menu1\shell\item1] "Icon"="shell32.dll,3" "MUIVerb"="Folder 1" [HKEY_CLASSES_ROOT\*\shell\My Menu\shell\menu1\shell\item1\command] @="wscript C:\copy.js %1 C:\Users\01\Pictures" [HKEY_CLASSES_ROOT\*\shell\My Menu\shell\menu1\shell\item2] "Icon"="shell32.dll,3" "MUIVerb"="Folder 2" [HKEY_CLASSES_ROOT\*\shell\My Menu\shell\menu1\shell\item2\command] @="wscript C:\copy.js %1 \"C:\New Folder\"" [HKEY_CLASSES_ROOT\*\shell\My Menu\shell\menu2] "Icon"="imageres.dll,-108" "MUIVerb"="Music" "SubCommands"="" [HKEY_CLASSES_ROOT\*\shell\My Menu\shell\menu2\shell\item1] "Icon"="shell32.dll,3" "MUIVerb"="Folder 1" [HKEY_CLASSES_ROOT\*\shell\My Menu\shell\menu2\shell\item1\command] @="wscript C:\copy.js %1 C:\Users\01\Music" [HKEY_CLASSES_ROOT\Directory\shell\My Menu] "Icon"="shell32.dll,43" "ExtendedSubCommandsKey"="*\shell\My Menu"
Referências
Invoque uma cópia do Windows a partir do PowerShell Método Folder.CopyHere (Windows)
Menus de contexto em cascata através de entradas de registro estáticas e ExtendedSubCommandsKey