'Windows Terminal's wt.exe cannot be found for non-admin user's PATH

Windows 10 with a non-admin user account.

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.

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.

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

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

Edit: 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

admin

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

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



Solution 1:[1]

Try adding an environment variable for your Path, let the value be:

%USERPROFILE%\AppData\Local\Microsoft\WindowsApps

Solution 2:[2]

In my case wt.exe had zero size after a reboot, and I was getting the message above when trying to run it. I was still able to open Windows Terminal from Start Menu.

Reinstalling the application from MS Store fixed the problem.

Backup your settings file (%userprofile%\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json) beforehand, as it will be overwritten with the default.

Solution 3:[3]

A different method that worked for me is:

  1. Delete %USERPROFILE%\AppData\Local\Microsoft\WindowsApps\wt.exe
  2. Go to Settings ? Apps ? Apps & Features ? Windows Terminal ? Advanced options ? Repair

The last step recreated the wt.exe and it worked after that.

P.S. I just noticed that this is a more convoluted way of accomplishing Brandon's answer.

Solution 4:[4]

I have a similar problem. However, when I opened %USERPROFILE%\AppData\Local\Microsoft\WindowsApps, I discovered that wt.exe was not in that path. I suspect the reason was that I've installed both Windows Terminal and Windows Terminal Preview as I have a folder for each, i.e. Microsoft.WindowsTerminal_ and Microsoft.WindowsTerminalPreview_.

I cheated my way out of this by using GnuWin32 utilities ( ln.exe ) to create a symbolic link to the Windows Terminal Preview of wt.exe ( both of which have a size of 0 bytes, for some reason? ) named wt.exe in the WindowsApps folder.

I checked using the Advanced System Properties-->Environment Variables and using env | findstr /i WindowsApps to make sure that the expected value was in the path. Afterwards, using wt.exe functioned as expected.

I know this seems like a very obvious gotcha, but this resolved my headache - at least for now.

Solution 5:[5]

I was faced with the same issue, and only replacement of the

%USERPROFILE%\AppData\Local\Microsoft\WindowsApps

onto

C:\Users\<username>\AppData\Local\Microsoft\WindowsApps

in the PATH was helpful. Hope this will help someone who came here for the answer as me. This weird and it will why aliases don't work in env path, but windows store installer uses them.

Solution 6:[6]

I just repaired this bug following this steps:

Settings -> Apps -> Apps & Features -> Windows Terminal -> Advanced options -> Repair

Solution 7:[7]

Been trying to figure this out as it happened randomly after a windows update. i followed a few procedures before and none worked until i tried this; Open an elevated CMD with Admin rights and run:

icacls "C:\Program Files\WindowsApps" /reset /t /c /q

It resets permissions on all the folders and files in the windows apps folder

from: https://github.com/microsoft/terminal/issues/7081

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 apena
Solution 2
Solution 3
Solution 4 Stuart Smith
Solution 5 sganabis
Solution 6 ZetaDK
Solution 7 paszha