2

I want to add the Windows Terminal (wt) to PATH, as I get the following error if I execute the commands "wt" and "wt.exe": wt

My problem is that Micro$oft has apparently added a version number to their folder name. So as soon as they update, the Windows Terminal link changes and it's not in PATH anymore. It's currently:

C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.15.3465.0_x64__8wekyb3d8bbwe

How can I keep the Windows Terminal in Path, so that I can execute it? I tried:

  1. Turning App execution aliases off and on
  2. "Repairing" the Windows Terminal App in the Apps&Features-Settings
12
  • I do not think such apps need to be in the path to execute. Terminal is in All Apps and it runs fine. Windows 10 and 11.
    – anon
    Commented Dec 19, 2022 at 21:24
  • Do you know how they are executed normally? Because it doesn't work for me...
    – MySurmise
    Commented Dec 19, 2022 at 21:30
  • I am not sure in your case. On my machines, Terminal runs normally and I never bothered adding to path.
    – anon
    Commented Dec 19, 2022 at 21:32
  • I added Lenovo Vantage (Store App) multiple computers and for sure did not add it to path.
    – anon
    Commented Dec 19, 2022 at 21:36
  • 1
    Try looking at a good machine and see if you can add the path back.
    – anon
    Commented Dec 19, 2022 at 21:41

1 Answer 1

5

Already answered via comments, but moving it to an answer (especially since it was what I was going to post before I even read the comments).

Windows Terminal (and many other Store apps) create App Execution Aliases, which are essentially "fake .exe files to launch the Store app. These .exe's are created in the user's %LOCALAPPDATA%\Microsoft\WindowsApps folder (a.k.a. %USERPROFILE%\AppData\Local\Microsoft\WindowsApps), which should automatically be in the default path.

However, I've seen cases of this folder being accidentally removed from the Path before, and I suspect (confirmed in the comments) that this is the case here, since you mention that you even tried toggling the app execution alias without improvement.

Check the Path user variable (not the System variable). The easiest access, IMHO, is by:

  • Searching for *Path" in the Start menu
  • Select Edit the system environment variables
  • Click the Environment Variables button
  • Edit the Path variable in the User variables for ... section, not the System variables one.

If %USERPROFILE%\AppData\Local\Microsoft\WindowsApps or %LOCALAPPDATA%\Microsoft\WindowsApps is missing, add it back in (the first form is the "normal" default).

Side-note: Even if there isn't an app execution alias for a Store app, you can often create a PowerShell script that will execute it. You can then place this script in a directory in your path (I use %USERPROFILE%\.local\bin to mimic Linux, which I've added to my path). There is typically a "package family name" that isn't tied to a particular version number that can be used.

See my answer here (or some of the other answers on that question) for details on finding the correct command-line.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .