无法为非管理员用户的 PATH 找到 Windows 终端的 wt.exe [英] Windows Terminal's wt.exe cannot be found for non-admin user's PATH

查看:78
本文介绍了无法为非管理员用户的 PATH 找到 Windows 终端的 wt.exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用非管理员用户帐户的 Windows 10.

Windows 10 with a non-admin user account.

从 Microsoft Windows 应用程序安装的 Windows 终端.从 cmd.exe 调用 wt.exe 找不到.使用快捷方式从开始运行 Windows 终端打开它.

Installed Windows Terminal from Microsoft Windows Apps. Calling wt.exe from cmd.exe can't find it. Running Windows Terminal from the Start using short-cut opens it OK.

cmd.exe 中从管理员帐户运行 wt.exe 成功打开它.PATH 变量包含非管理员用户的相关条目:%USERPROFILE%\AppData\Local\Microsoft\WindowsApps,其中包含 wt.exe.在资源管理器中点击它会打开 Windows 终端.

Running wt.exe in cmd.exe from admin account opens it successfully. PATH variable has the non-admin user's relevant entry: %USERPROFILE%\AppData\Local\Microsoft\WindowsApps which has wt.exe in it. Clicking on it in Explorer opens Windows Terminal.

cmd.exe 中 whereecho 的输出:

Outputs of where and echo from within cmd.exe:

C:\Users\sr>wt
'wt' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\sr>where wt
INFO: Could not find files for the given pattern(s).

C:\Users\sr>echo %USERPROFILE%
C:\Users\sr

如何使用非管理员帐户的 wt.extcmd.exe 打开 Windows 终端?

How do I open Windows Terminal from cmd.exe using wt.ext from non-admin account?

所有命令都在 cmd.exe 中运行
编辑 2:wt.exe 也无法从 Powershell 启动,标准和管理员:标准:

all commands are run from within cmd.exe
Edit 2: wt.exe also fails to launch from Powershell, both standard and admin: standard:

PS C:\Users\sr> wt
wt : The term 'wt' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name,
or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ wt
+ ~~
    + CategoryInfo          : ObjectNotFound: (wt:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

管理员

PS C:\WINDOWS\system32> wt
Program 'wt.exe' failed to run: The file cannot be accessed by the systemAt line:1 char:1
+ wt
+ ~~.
At line:1 char:1
+ wt
+ ~~
    + CategoryInfo          : ResourceUnavailable: (:) [], ApplicationFailedException
    + FullyQualifiedErrorId : NativeCommandFailed

编辑 3:在 cmd.exe 中,输入 wt.exe 的完整路径启动它:C:\Users\sr>C:\Users\sr\AppData\Local\Microsoft\WindowsApps\wt.exe

Edit 3: in cmd.exe, typing full path to wt.exe launches it OK: C:\Users\sr>C:\Users\sr\AppData\Local\Microsoft\WindowsApps\wt.exe

推荐答案

TLDR: 尝试在 Windows 10 中打开 App execution aliases 设置页面并切换 Windows 的开关终端关闭,然后重新打开.

TLDR: Try opening the App execution aliases settings page in Windows 10 and toggle the switch for Windows Terminal off and then back on again.

我不确定这是否与原始问题中的问题完全相同,但我随机遇到了 wt 命令不起作用的问题(或者当我在开始菜单中输入它时)然后按回车键,或者当我在文件资源管理器的地址栏中输入它以尝试在当前目录中打开终端时).如果我在开始菜单中手动单击 Windows 终端或打开它的 Microsoft Store 页面并单击启动"按钮,然后它会工作.我的路径环境变量是有序的,我没有安装 Windows 终端预览——只是 Windows 终端.

I'm not sure if this is exactly the same issue as in the original question, but I randomly just had issues with the wt command not working (either when I typed it into the Start Menu and pressed enter, or when I typed it into the address bar of File Explorer to try to open a terminal in the current directory). If I manually clicked Windows Terminal in the start menu or opened the Microsoft Store page for it and clicked the "Launch" button, then it would work. My path environment variable was in order and I didn't have the Windows Terminal Preview installed---just Windows Terminal.

在谷歌搜索之后,我发现了一些提到应用执行别名"的内容.Windows 10 中的设置页面.我打开它并关闭开关,此时我看到 %USERPROFILE%\AppData\Local\Microsoft\WindowsApps\wt.exe 文件消失了.然后我重新打开它,wt.exe 重新出现在该文件夹中.这样做之后,一切又正常了.

After Googling around some, I found something that mentioned the "App execution aliases" settings page in windows 10. I opened that and toggled the switch off, at which point I saw the %USERPROFILE%\AppData\Local\Microsoft\WindowsApps\wt.exe file disappear. Then I toggled it back on and wt.exe reappeared in that folder. After doing that, everything works fine again.

这篇关于无法为非管理员用户的 PATH 找到 Windows 终端的 wt.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆