LittleNewton / wt-here

在 Windows 右键菜单中添加 Windows Terminal 启动选项
MIT License
215 stars 49 forks source link

安装后只有管理员权限项 #4

Closed GrandArth closed 1 year ago

GrandArth commented 3 years ago

如题 ps版本: Name Value ---- ----- PSVersion 7.1.1 PSEdition Core GitCommitId 7.1.1 OS Microsoft Windows 10.0.19042 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0 系统为专业版, 虽然我觉得这应该和问题无关.

如果有出现了我和我一样问题的人, 请使用注册表编辑器复制脚本建立的管理员项, 去掉一个LUA什么的项就可以建立非管理员权限的终端.

GrandArth commented 3 years ago

meanwhile you can use

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\MenuTerminalMini]
 @="打开Windows Terminal"

[HKEY_CLASSES_ROOT\Directory\Background\shell\MenuTerminalMini\command]
 @="C:\\Users\\<<input your user name here! Note this is a path, not your full user name >>\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe"

To add a normal item

GrandArth commented 3 years ago

At later test, it seems a restart will do the trick, which leaves my above comment useless. The normal privilege item will appear after a reboot. (Though i didn't find the correspond item in my reg.) I consider this behaviour a little weird, but this issue closed.

Feel free to close it after you check it.

LittleNewton commented 3 years ago

@GrandArth

之前的版本是有普通权限选项的,但是在某个 Windows Terminal 1.5.10271.0 之后,安装 Windows-Terminal 会自动添加一个普通权限的右键菜单。为了避免与软件自带的菜单冲突(做相同的功能),我在 67334042e8c01a80cea6cf0bf034050c99babcab 提交里删除了普通权限选项,只保留管理员权限。

如果你的 Windows-Termianl 版本较低,可以尝试 git checkout 命令回退到上述的提交之前并重新运行该脚本。

GrandArth commented 3 years ago

@GrandArth

之前的版本是有普通权限选项的,但是在某个 Windows Terminal 1.5.10271.0 之后,安装 Windows-Terminal 会自动添加一个普通权限的右键菜单。为了避免与软件自带的菜单冲突(做相同的功能),我在 6733404 提交里删除了普通权限选项,只保留管理员权限。

如果你的 Windows-Termianl 版本较低,可以尝试 git checkout 命令回退到上述的提交之前并重新运行该脚本。

原来如此,感谢说明。 我额外问一下,请问您知道windows terminal添加的普通权限项在注册表的哪个位置吗?

LittleNewton commented 3 years ago

@GrandArth

Registry::HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\MenuTerminalAdmin
Registry::HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\MenuTerminalMini_Admin
Registry::HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\Background\shell\MenuTerminalMini_Admin

Mini 风格的 item 可以在上面几个位置找一下。

OrdinaryYZH commented 11 months ago

我今天安装的terminal 是1.8的,默认也没有右键启动,可能作者还需要改回来。后来我也用了之前版本的脚本成功了