Win10添加右键菜单的注册表脚本

windows10常用的右键菜单,使用注册表脚本添加。包括:Notepad++、VSCode、Git Bash、CMD、Powershell。

1. Notepad++右键菜单

Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\*\shell\NotePad++]

[HKEY_CLASSES_ROOT\*\shell\NotePad++]
@="Edit with Notepad++"
"Icon"="E:\\PortableSoft\\npp.7.8.8.bin\\notepad++.exe"

[HKEY_CLASSES_ROOT\*\shell\NotePad++\Command]
@="E:\\PortableSoft\\npp.7.8.8.bin\\notepad++.exe \"%1\""

2. VSCode右键菜单

Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\*\shell\open in vscode]

[HKEY_CLASSES_ROOT\*\shell\open in vscode]
@="Edit with VSCode"
"icon"="E:\\PortableSoft\\VSCode-win32-x64-1.46.1\\Code.exe"

[HKEY_CLASSES_ROOT\*\shell\open in vscode\Command]
@="E:\\PortableSoft\\VSCode-win32-x64-1.46.1\\Code.exe \"%1\""

3. Git Bash右键菜单

Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\Directory\Background\shell\open in git]

[HKEY_CLASSES_ROOT\Directory\Background\shell\open in git]
@="Git Bash Here"
"icon"="E:\\PortableSoft\\PortableGit\\mingw64\\share\\git\\git-for-windows.ico"

[HKEY_CLASSES_ROOT\Directory\Background\shell\open in git\command]
@="E:\\PortableSoft\\PortableGit\\git-bash.exe"

4. CMD右键菜单

Windows Registry Editor Version 5.00

; 右键背景,弹出菜单选项
[-HKEY_CLASSES_ROOT\Directory\Background\shell\CMD Here]

[HKEY_CLASSES_ROOT\Directory\Background\shell\CMD Here]
@="CMD Here"
"icon"="cmd.exe"

[HKEY_CLASSES_ROOT\Directory\Background\shell\CMD Here\command]
@="cmd.exe /s /k pushd \"%V\""

; 右键文件夹,弹出菜单选项
[-HKEY_CLASSES_ROOT\Folder\shell\CMD Here]

[HKEY_CLASSES_ROOT\Folder\shell\CMD Here]
@="CMD Here"
"icon"="cmd.exe"

[HKEY_CLASSES_ROOT\Folder\shell\CMD Here\command]
@="cmd.exe /s /k pushd \"%V\""

; 添加管理员打开cmd菜单
[-HKEY_CLASSES_ROOT\Directory\shell\runas]

[HKEY_CLASSES_ROOT\Directory\shell\runas]
@="CMD Here as Administrator"
"icon"="cmd.exe"
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""

[-HKEY_CLASSES_ROOT\Directory\Background\shell\runas]

[HKEY_CLASSES_ROOT\Directory\Background\shell\runas]
@="CMD Here as Administrator"
"icon"="cmd.exe"
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\Directory\Background\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""

[-HKEY_CLASSES_ROOT\Drive\shell\runas]

[HKEY_CLASSES_ROOT\Drive\shell\runas]
@="CMD Here as Administrator"
"icon"="cmd.exe"
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\Drive\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""

[-HKEY_CLASSES_ROOT\LibraryFolder\background\shell\runas]

[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\runas]
@="CMD Here as Administrator"
"icon"="cmd.exe"
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""

5. Powershell右键菜单

Windows Registry Editor Version 5.00

; 添加到桌面右键菜单
[-HKEY_CLASSES_ROOT\Directory\background\shell\Powershell Here]
[HKEY_CLASSES_ROOT\Directory\background\shell\Powershell Here]
@="PowerShell Here"
"Icon"="powershell.exe"

[HKEY_CLASSES_ROOT\Directory\background\shell\Powershell Here\command]
@="powershell.exe -noexit -command Set-Location -literalPath '%V'"

; 添加到文件夹右键菜单
[-HKEY_CLASSES_ROOT\Directory\shell\Powershell Here]
[HKEY_CLASSES_ROOT\Directory\shell\Powershell Here]
@="PowerShell Here"
"Icon"="powershell.exe"

[HKEY_CLASSES_ROOT\Directory\shell\Powershell Here\command]
@="powershell.exe -noexit -command Set-Location -literalPath '%V'"

; 管理员
; 添加到桌面右键菜单
[-HKEY_CLASSES_ROOT\Directory\background\shell\Powershell Admin]
[HKEY_CLASSES_ROOT\Directory\background\shell\Powershell Admin]
@="PowerShell as Administrator"
"Icon"="powershell.exe"
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\Directory\background\shell\Powershell Admin\command]
@="powershell.exe -command Start-Process powershell -Verb runAs"

; 添加到文件夹右键菜单
[-HKEY_CLASSES_ROOT\Directory\shell\Powershell Admin]
[HKEY_CLASSES_ROOT\Directory\shell\Powershell Admin]
@="PowerShell as Administrator"
"Icon"="powershell.exe"
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\Directory\shell\Powershell Admin\command]
@="powershell.exe -command Start-Process powershell -Verb runAs"

打赏作者

Copyright © 2021,枫糖, 版权所有,禁止转载、演绎、商用。

添加评论

code