-
ctrl + r
-
输入
regedit
-
找到
HKEY_CLASSES_ROOT\Directory\shell
-
新建 项 , 命名 powershellmenu
在右侧的 默认项 中 写入 Open PowerShell Here
- 在 powershellmenu 下右键 新建 项 , 命名 command
在右侧的 默认项 中 写入
"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -windowstyle hidden -Command $stpath = pwd; Start-Process PowerShell -ArgumentList \"-NoExit\", \"-Command Set-Location -literalPath '%V'\"
- (可选)如果要用 管理者权限 打开, 在第5步 右侧的 默认项 写入的 值
"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -windowstyle hidden -Command $stpath = pwd; Start-Process PowerShell -ArgumentList \"-NoExit\", \"-Command Set-Location -literalPath '%V'\" -verb RunAs