Ein alternativer Ansatz für Ihre Referenz:
Speichern Sie Folgendes *.reg
und importieren Sie es in die Registrierung (angepasst von Sully @ Wilders Security ).
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT \ * \ shell \ My Menu]
"Icon" = "shell32.dll, 43"
"Unterbefehle" = ""
[HKEY_CLASSES_ROOT \ * \ shell \ Mein Menü \ shell \ menu1]
"MUIVerb" = "Texteditor"
"SubCommands" = ""
[HKEY_CLASSES_ROOT \ * \ shell \ Mein Menü \ shell \ menu1 \ shell \ item1]
"MUIVerb" = "Notepad ++"
[HKEY_CLASSES_ROOT \ * \ shell \ Mein Menü \ shell \ menu1 \ shell \ item1 \ Befehl]
@ = "C: \\ Programme \\ npp \\ notepad ++. Exe% 1"
[HKEY_CLASSES_ROOT \ * \ shell \ Mein Menü \ shell \ menu1 \ shell \ item2]
"MUIVerb" = "Erhabener Text"
[HKEY_CLASSES_ROOT \ * \ shell \ Mein Menü \ shell \ menu1 \ shell \ item2 \ Befehl]
@ = "C: \\ Programme \\ Sublime Text 3 \\ sublime_text.exe% 1"
[HKEY_CLASSES_ROOT \ * \ shell \ Mein Menü \ shell \ menu2]
"MUIVerb" = "Audio"
"SubCommands" = ""
[HKEY_CLASSES_ROOT \ * \ shell \ Mein Menü \ shell \ menu2 \ shell \ item1]
"MUIVerb" = "Kühnheit"
[HKEY_CLASSES_ROOT \ * \ shell \ Mein Menü \ shell \ menu2 \ shell \ item1 \ Befehl]
@ = "audacity.exe% 1"
Referenzen
AskVG
Directory Opus Resource Center
Nachtrag: Pseudo-Ordner-Menü
Speichern als C:\copy.js
Funktion fnCopyHereJ (src, dest) {
var objShell = neues ActiveXObject ("shell.application");
var objFolder = objShell.NameSpace (dest);
if (objFolder) {
objFolder.CopyHere (src);
} else {
WScript.echo ("Ungültiger Ordner:" + dest);
}}
}}
args = WScript.Arguments;
fnCopyHereJ (args (0), args (1));
In Registrierung importieren
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT \ * \ shell \ My Menu]
"Icon" = "shell32.dll, 43"
"Unterbefehle" = ""
[HKEY_CLASSES_ROOT \ * \ shell \ Mein Menü \ shell \ menu1]
"Icon" = "imageres.dll, -113"
"MUIVerb" = "Bild"
"SubCommands" = ""
[HKEY_CLASSES_ROOT \ * \ shell \ Mein Menü \ shell \ menu1 \ shell \ item1]
"Icon" = "shell32.dll, 3"
"MUIVerb" = "Ordner 1"
[HKEY_CLASSES_ROOT \ * \ shell \ Mein Menü \ shell \ menu1 \ shell \ item1 \ Befehl]
@ = "wscript C: \\ copy.js% 1 C: \\ Benutzer \\ 01 \\ Bilder"
[HKEY_CLASSES_ROOT \ * \ shell \ Mein Menü \ shell \ menu1 \ shell \ item2]
"Icon" = "shell32.dll, 3"
"MUIVerb" = "Ordner 2"
[HKEY_CLASSES_ROOT \ * \ shell \ Mein Menü \ shell \ menu1 \ shell \ item2 \ Befehl]
@ = "wscript C: \\ copy.js% 1 \" C: \\ Neuer Ordner \ ""
[HKEY_CLASSES_ROOT \ * \ shell \ Mein Menü \ shell \ menu2]
"Icon" = "imageres.dll, -108"
"MUIVerb" = "Musik"
"SubCommands" = ""
[HKEY_CLASSES_ROOT \ * \ shell \ Mein Menü \ shell \ menu2 \ shell \ item1]
"Icon" = "shell32.dll, 3"
"MUIVerb" = "Ordner 1"
[HKEY_CLASSES_ROOT \ * \ shell \ Mein Menü \ shell \ menu2 \ shell \ item1 \ Befehl]
@ = "wscript C: \\ copy.js% 1 C: \\ Benutzer \\ 01 \\ Musik"
[HKEY_CLASSES_ROOT \ Directory \ shell \ My Menu]
"Icon" = "shell32.dll, 43"
"ExtendedSubCommandsKey" = "* \\ shell \\ Mein Menü"
Referenzen
Rufen Sie die Windows-Kopie aus der PowerShell
Folder.CopyHere-Methode (Windows) auf.
Kaskadieren von Kontextmenüs über statische Registrierungseinträge und ExtendedSubCommandsKey