MyGit
🚩收到GitHub仓库的更新通知

LittleNewton/wt-here

Fork: 50 Star: 206 (更新于 2024-04-27 11:07:24)

license: MIT

Language: PowerShell .

在 Windows 右键菜单中添加 Windows Terminal 启动选项

GitHub网址

✨免费申请网站SSL证书,支持多域名和泛域名,点击查看

Open Windows Terminal Here

A project backed by LeXtudio Inc.

1. 安装指南

  1. 安装 Windows Terminal.
  2. 安装 PowerShell 7.
  3. 管理员身份启动 PowerShell 7 控制台 (Powershell 5 是不行的),然后运行 src 目录下的 install.ps1 脚本,将【上下文菜单项】安装到 Windows 资源管理器。现在,菜单项已添加到 Windows 资源管理器上下文菜单了。

layout

图 1: 三种安装方式,注意,一定要在管理员模式下安装,切记!(个人比较喜欢默认Mini 模式)

2. 安装示例

2.1 Windows 10 安装

  1. 以管理员身份打开刚安装好的 Powershell Core 7,然后切换工作目录到本库
  2. 确保网络畅通;
  3. 执行 install.ps1,然后你将获得一个类似图 1 中的第 1 幅图的桌面、文件夹右键菜单。

如果只运行 install.ps1 而不加参数,那么菜单项将以 Mini 布局组织。 其他布局(如 DefaultFlat)具有不同的外观。 要应用其他布局(如 Flat),只需运行 install.ps1 Flat

由于项目维护者 @LittleNewton 不喜欢 Windows 11,因此不保证脚本在该系统上的可用性。

2.2 Windows Server 2022 安装

Administrator 用户可通过添加自定义路径参数的方式执行脚本:

# 注意替换自定义的路径
.\install.ps1 -CustomPath "C:\Users\Administrator\bin\Microsoft Windows Terminal"

对于 Windows Server 2022 普通用户,可以通过执行 $WithNormal 命令开关的方式,添加两个右键菜单,分别为普通用户和管理员用户,命令如下:

# 注意替换自定义路径
.\install.ps1 -CustomPath "D:\Users\newton\bin\Microsoft Windows Terminal" -WithNormal

除此之外,其他细节同普通 Windows 10.

3. 卸载

以管理员身份,在 PowerShell 7 中,执行 uninstall.ps1 即可删除该配置。

4. 注意

  • 当前版本仅支持 Windows 10 和 Windows Server 2022;
  • install.ps1uninstall.ps1 脚本必须以管理员身份运行;
  • 必须在版本 >= 6 的 PowerShell 下执行脚本;
  • install.ps1uninstall.ps1 仅操作上下文菜单项的 Windows 资源管理器设置,而不写入 Windows Terminal 的设置;
  • 从 GitHub 下载 Windows Terminal 图标 (在 install.ps1 中) 需要 Internet 连接,最好在运行 install.ps1 时,将代理软件设置为全局代理;

最近版本更新:(数据更新于 2024-04-27 09:57:51)

主题(topics):

powershell, right-click-menu, windows-terminal

LittleNewton/wt-here同语言 PowerShell最近更新仓库

2024-04-16 16:50:17 actions/runner-images

2024-04-13 01:34:06 dataplat/dbatools

2024-04-12 01:41:23 dotnet/core

2024-03-27 23:45:58 PSAppDeployToolkit/PSAppDeployToolkit

2024-02-09 17:46:21 denoland/deno_install

2023-12-16 00:04:29 k8gege/Ladon