给服务器手动安装Windows terminal
这个教程大概率没用,因为新的系统肯定可以自带wt。
- 从GitHub下载wt的release版本,进入Github官方库下载最新的Microsoft Terminal安装包,下载地址:
https://github.com/microsoft/terminal/releases - 下载类似于:
Microsoft.WindowsTerminal_Win10_1.14.2281.0_8wekyb3d8bbwere.msixbundle - 下载类似于:
Microsoft.WindowsTerminal_Win10_1.14.2281.0_8wekyb3d8bbwse.msixbundle_Windows10_PreinstallKit.zip #切换到依赖的包目录 cd .\Microsoft.WindowsTerminal_Win10_1.14.2281.0_8wekyb3d8bbwe.msixbundle_Windows10_PreinstallKit\ #先安装依赖的包 Add-AppxPackage -Path .\Microsoft.VCLibs.140.00.UWPDesktop_14.0.30704.0_x64__8wekyb3d8bbwe.appx #再回到上一级目录 cd .. #安装WindowsTerminal Add-AppxPackage -Path .\Microsoft.WindowsTerminal_Win10_1.14.2281.0_8wekyb3d8bbwe.msixbundle- 然后添加注册表项目:
添加到右键菜单,创建.reg文件然后编辑为如下内容,以修改注册表:(注意,编辑的reg必须是ansi编码,同时该方法有个问题就是不能在C盘以外的盘符根目录启动)
Windows Registry Editor Version 5.00
; 1. 在文件夹内部空白处右键打开
[HKEY_CLASSES_ROOT\Directory\Background\shell\WindowsTerminal]
@="在此处启动 Terminal"
"Icon"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_1.24.11321.0_x64__8wekyb3d8bbwe\\wt.exe,0"
[HKEY_CLASSES_ROOT\Directory\Background\shell\WindowsTerminal\command]
@="\"C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_1.24.11321.0_x64__8wekyb3d8bbwe\\wt.exe\" -d \"%V\""
; 2. 在文件夹本身右键打开
[HKEY_CLASSES_ROOT\Directory\shell\WindowsTerminal]
@="在此处启动 Terminal"
"Icon"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_1.24.11321.0_x64__8wekyb3d8bbwe\\wt.exe,0"
[HKEY_CLASSES_ROOT\Directory\shell\WindowsTerminal\command]
@="\"C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_1.24.11321.0_x64__8wekyb3d8bbwe\\wt.exe\" -d \"%1\""
; 1. 修改 .bat 文件的打开方式
[HKEY_CLASSES_ROOT\batfile\shell\open\command]
@="\"C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_1.24.11321.0_x64__8wekyb3d8bbwe\\wt.exe\" cmd.exe /k \"%1\" %*"
; 2. 修改 .cmd 文件的打开方式
[HKEY_CLASSES_ROOT\cmdfile\shell\open\command]
@="\"C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_1.24.11321.0_x64__8wekyb3d8bbwe\\wt.exe\" cmd.exe /k \"%1\" %*"
取消配置:
Windows Registry Editor Version 5.00
; 恢复 .bat 默认打开方式
[HKEY_CLASSES_ROOT\batfile\shell\open\command]
@="\"%1\" %*"
; 恢复 .cmd 默认打开方式
[HKEY_CLASSES_ROOT\cmdfile\shell\open\command]
@="\"%1\" %*"
[-HKEY_CLASSES_ROOT\Directory\Background\shell\WindowsTerminal]
[-HKEY_CLASSES_ROOT\Directory\shell\WindowsTerminal]
