Pendekatan alternatif untuk referensi Anda:
Simpan sebagai *.reg
dan impor ke registri (diadaptasi dari Sully @ Wilders Security )
Windows Registry Editor Versi 5.00
[HKEY_CLASSES_ROOT \ * \ shell \ Menu Saya]
"Ikon" = "shell32.dll, 43"
"Subcommands" = ""
[HKEY_CLASSES_ROOT \ * \ shell \ My Menu \ shell \ menu1]
"MUIVerb" = "Editor Teks"
"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" = "Teks Luhur"
[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"
Referensi Pusat Sumberdaya Direktori Opus
AskVG
Tambahan: Menu Folder semu
Simpan sebagai C:\copy.js
function fnCopyHereJ (src, dest) {
var objShell = new ActiveXObject ("shell.application");
var objFolder = objShell.NameSpace (dest);
if (objFolder) {
objFolder.CopyHere (src);
} lain {
WScript.echo ("Folder Tidak Valid:" + dest);
}
}
args = WScript.Arguments;
fnCopyHereJ (args (0), args (1));
Impor ke registri
Windows Registry Editor Versi 5.00
[HKEY_CLASSES_ROOT \ * \ shell \ Menu Saya]
"Ikon" = "shell32.dll, 43"
"Subcommands" = ""
[HKEY_CLASSES_ROOT \ * \ shell \ My Menu \ shell \ menu1]
"Icon" = "imageres.dll, -113"
"MUIVerb" = "Gambar"
"SubCommands" = ""
[HKEY_CLASSES_ROOT \ * \ shell \ My Menu \ shell \ menu1 \ shell \ item1]
"Ikon" = "shell32.dll, 3"
"MUIVerb" = "Folder 1"
[HKEY_CLASSES_ROOT \ * \ shell \ My Menu \ shell \ menu1 \ shell \ item1 \ command]
@ = "wscript C: \\ copy.js% 1 C: \\ Pengguna \\ 01 \\ Gambar"
[HKEY_CLASSES_ROOT \ * \ shell \ My Menu \ shell \ menu1 \ shell \ item2]
"Ikon" = "shell32.dll, 3"
"MUIVerb" = "Folder 2"
[HKEY_CLASSES_ROOT \ * \ shell \ My Menu \ shell \ menu1 \ shell \ item2 \ command]
@ = "wscript C: \\ copy.js% 1 \" C: \\ Folder Baru \ ""
[HKEY_CLASSES_ROOT \ * \ shell \ My Menu \ shell \ menu2]
"Ikon" = "imageres.dll, -108"
"MUIVerb" = "Musik"
"SubCommands" = ""
[HKEY_CLASSES_ROOT \ * \ shell \ My Menu \ shell \ menu2 \ shell \ item1]
"Ikon" = "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 \ Menu Saya]
"Ikon" = "shell32.dll, 43"
"ExtendedSubCommandsKey" = "* \\ shell \\ Menu Saya"
Referensi Meminta
salinan Windows dari
metode PowerShell Folder.CopyHere (Windows)
Cascading menu melalui entri registri statis dan ExtendedSubCommandsKey