之前版本的 Windows 系統(tǒng)中,按住
shift鍵的同時(shí)在空白處點(diǎn)擊右鍵,可以找到從此處打開命令提示符的菜單項(xiàng)??上Ш竺姘姹镜?Win10 系統(tǒng)移除了該菜單項(xiàng),替換成從此處打開 Powershell 窗口。
可能習(xí)慣所致,對 Poweshell 不太感冒(啟動很慢的感覺[狗頭])。在 cmd 中手動切換目錄又過于麻煩,尤其是在跨驅(qū)動器的情況下。
故嘗試在右鍵菜單中添加“打開命令提示符”選項(xiàng)。

cmd
一、添加“從此處打開命令提示符”右鍵菜單
- 打開注冊表編輯器(
CTRL+R->regedit) - 切換到
HKEY_CLASSES_ROOT\Directory\Background\shell\ - 新建項(xiàng) cmd_shell,其中字符串值
(默認(rèn))的數(shù)據(jù)改為“打開命令提示符”(菜單項(xiàng)的名稱) - 在 cmd_shell 中新建字符串值,名稱為
Icon,數(shù)據(jù)為C:\Windows\System32\cmd.exe(圖標(biāo)路徑) - 在 cmd_shell 下新建項(xiàng)
command,修改字符串值(默認(rèn))的數(shù)據(jù)為cmd.exe /s /k pushd "%V"(具體執(zhí)行的命令)

regedit

regedit
如不想手動添加注冊表,以下為可直接雙擊導(dǎo)入的 open_cmd.reg 文件:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\cmd_shell]
@="打開命令提示符"
"Icon"="C:\\Windows\\System32\\cmd.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\cmd_shell\command]
@="cmd.exe /s /k pushd \"%V\""
二、右鍵菜單添加“使用 VSCode 編輯文件”

VSCode
個(gè)人習(xí)慣問題,感覺右鍵點(diǎn)擊代碼源文件,彈出的菜單里包含“使用 VSCode 編輯”會比較方便一點(diǎn)。方法同樣是修改注冊表。
- 打開注冊表編輯器(
CTRL+R->regedit) - 切換到
HKEY_CLASSES_ROOT\*\shell - 新建項(xiàng) vscode,其中字符串值
(默認(rèn))的數(shù)據(jù)改為“Open with VSCode”(菜單項(xiàng)的名稱) - 在 vscode 中新建字符串值,名稱為
Icon,數(shù)據(jù)類似"F:\Software\VSCode-win32-x64-1.36.1\Code.exe"(圖標(biāo)路徑) - 在 vscode 下新建項(xiàng)
command,修改字符串值(默認(rèn))的數(shù)據(jù)為"F:\Software\VSCode-win32-x64-1.36.1\Code.exe" "%1"(具體執(zhí)行的命令)
regedit
regedit
如不想手動添加注冊表,以下為可直接雙擊導(dǎo)入的 open_with_code.reg 文件:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\VSCode]
@="Open with Code"
"Icon"="F:\\Software\\VSCode-win32-x64-1.36.1\\Code.exe"
[HKEY_CLASSES_ROOT\*\shell\VSCode\command]
@="\"F:\\Software\\VSCode-win32-x64-1.36.1\\Code.exe\" \"%1\""

