Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHere]
@="Terminal"
"Icon"="C:\\Windows\\System32\\terminal.png"
[HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHere\command]
@="C:\\Users\\Administrator\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere]
@="Terminal"
"Icon"="C:\\Windows\\System32\\terminal.png"
[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere\command]
@="C:\\Users\\Administrator\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe"
[HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHere]
@="Terminal"
"Icon"="C:\\Windows\\System32\\terminal.png"
[HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHere\command]
@="C:\\Users\\Administrator\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe"
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHere]
@="Terminal"
"Icon"="C:\\Windows\\System32\\terminal.png"
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHere\command]
@="C:\\Users\\Administrator\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe"
注意事项
虽然能打开终端,但是路径并不是当前路径,需要在修改windows terminal配置:
打开 Windows Terminal --> 设置,给 profiles.defaults 加上:"startingDirectory": null
注意:wt.exe 路径