文件右键添加编辑功能
效果:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\editWith]
@=""
"MUIVerb"="&编辑"
"Subcommands"=""
[HKEY_CLASSES_ROOT\*\shell\editWith\shell]
[HKEY_CLASSES_ROOT\*\shell\editWith\shell\notepad]
@="记事本"
"Icon"="C:\\Windows\\System32\\notepad.exe"
[HKEY_CLASSES_ROOT\*\shell\editWith\shell\notepad\command]
@="\"C:\\Windows\\System32\\notepad.exe\" \"%1\""
[HKEY_CLASSES_ROOT\*\shell\editWith\shell\VS code]
"Icon"="C:\\Program Files\\Microsoft VS Code\\Code.exe"
[HKEY_CLASSES_ROOT\*\shell\editWith\shell\VS code\command]
@="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%1\""
文件夹空白处右键添加此处打开cmd
效果图:
注册表:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\cmdshow]
@="@shell32.dll,-8506"
[HKEY_CLASSES_ROOT\Directory\Background\shell\cmdshow\command]
@="cmd.exe /s /k pushd \"%V\""
按下shift显示管理员身份运行cmd
注意,键名必须是runas
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\runas]
@="在此处打开命令窗口(管理员)"
"ShowBasedOnVeLocityId"=dword:00639bc8
"Extended"=""
[HKEY_CLASSES_ROOT\Directory\Background\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""
再添加一个子菜单用管理员打开powershell
迫不得已用子菜单,因为同一级只能有一个runas项,这个runas被cmd用了,只好弄个子菜单凑合凑合。不过我一般也用不到powershell
效果:
注册表:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\PowershellAdmin]
@=""
"Subcommands"=""
"MUIVerb"="powershell管理员"
"Extended"=""
"ShowBasedOnVeLocityId"=dword:00639bc8
[HKEY_CLASSES_ROOT\Directory\Background\shell\PowershellAdmin\shell]
[HKEY_CLASSES_ROOT\Directory\Background\shell\PowershellAdmin\shell\runas]
@="Powershell(管理员)"
[HKEY_CLASSES_ROOT\Directory\Background\shell\PowershellAdmin\shell\runas\command]
@="powershell.exe -noexit -command Set-Location -literalPath '%V'"
改完后注册表结构: