Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add wt.exe to the PATH when installing terminal from Microsoft Store? #628

Closed
brupelo opened this issue Dec 17, 2022 · 3 comments · Fixed by #643
Closed

How to add wt.exe to the PATH when installing terminal from Microsoft Store? #628

brupelo opened this issue Dec 17, 2022 · 3 comments · Fixed by #643

Comments

@brupelo
Copy link

brupelo commented Dec 17, 2022

After reading the section https://learn.microsoft.com/en-us/windows/terminal/command-line-arguments?tabs=windows I'm still unsure what'd be the proper way to add wt.exe to the PATH. I've installed the terminal through the windows store and when I try to open C:\Program Files\WindowsApps I'll get some permissions error

image

So, what's the proper way to add the terminal to the PATH?

In the docs says

Note

If you built Windows Terminal from the source code on GitHub, you can open that build using wtd.exe or wtd.

But I'm using it from the Microsoft Store so that doesn't help much here :/

@DHowett
Copy link
Contributor

DHowett commented Dec 17, 2022

The right way to add wt to your PATH is to enable its "app execution alias" in the "Manage app execution aliases" page of Windows settings.

It should be turned on by default (which is probably why we haven't yet documented how to turn it on! Thanks!)

If you are having trouble accessing app execution aliases, you might need to check whether your PATH contains %LOCALAPPDATA%\Microsoft\WindowsApps.

@brupelo
Copy link
Author

brupelo commented Dec 18, 2022

@DHowett Wow, thank you very much, this was really helpful, I wasn't aware about this concept of "Manage app execution aliases" at all, nice!

Any reason why this shouldn't be documented somehow (a reference maybe) in https://learn.microsoft.com/en-us/windows/terminal/command-line-arguments?tabs=windows section though?

Btw, it works now although for some reason (probably because how variable expansion works?), if I added directly %LOCALAPPDATA%\Microsoft\WindowsApps to PATH wouldn't work but if I add the expanded variable such as C:\Users\my_user\AppData\Local\Microsoft\WindowsApps to PATH will work. I remember I've read something about this issue in the past in the docs although I can't find the reference right now. Of course, LOCALAPPDATA variable is defined in the user's environment.

Anyway, again, thank you very much!

@zadjii-msft
Copy link
Contributor

Meh, yea we could probably add a note to the bottom of the command line args page. Something to mention that users should make sure to have %LOCALAPPDATA%\Microsoft\WindowsApps in the PATH. And to definitely mention avoiding C:\Program Files\WindowsApps - I can't tell you how many people try to mess with that and end up needing to reinstall the OS 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants