terminal
terminal copied to clipboard
Execution Alias for Preview not working from Run Dialog box
Windows Terminal version
1.16.2523.0
Windows build number
19044.2006
Other Software
No response
Steps to reproduce
Change execution alias in settings app from WindowsTerminal to WindowsTerminalPreview
Then type wt into the run dialox box.
Expected Behavior
I would then expect windows terminal preview to open.
Actual Behavior
I receive this message instead.

I can open windows terminal preview by just searching in the start menu for terminal preview. If I switch the alias back to the non-preview terminal then the wt alias will open the regular release of terminal. It is just when I switch the alias to the preview and then try to open the preview with wt from the run dialog box that I get the error. Interestingly, I can open the preview terminal by typing wt into an already open terminal preview window and it will work fine. Just seems to be opening wt from the run dialog box. In fact, I can even type wt into the command line (cmd.exe) and it will open terminal preview just fine. Seems there is something special about the run dialog box??
Thanks! Paul
Also, just realized the title of the dialog box suggests it is trying to openan older terminal version, 1.24.2281.0? Not sure where that is coming from and/or why the run box would try to open that version when all other uses of wt open the preview terminal without issue.
I wonder if this is related to #9452.
Well, through that link and then through other related links I was able to come to a workaround.
I read the issue #9452 which I then followed to several other issues, eventually landing here: https://github.com/microsoft/terminal/issues/12534 and https://github.com/microsoft/terminal/issues/12249
My permissions (which I haven't touched) looked exactly like they should be according to: https://github.com/microsoft/terminal/issues/12534#issuecomment-1048851877
I did perform the takeown and cacls anyway as suggested here, which had no effect. https://github.com/microsoft/terminal/issues/12534#issuecomment-1051338640
I then looked at this comment: https://github.com/microsoft/terminal/issues/7081#issuecomment-1065833836 about registry settings. In my case the registry looked like this:
I thought this was interesting because it references that weird older version of terminal 1.24.2281.0 in the registry. I tried deleting the wt.exe key in its entirety but that had no effect whatsoever.
The comment linked to from #7081 suggested just changing the paths from C:\Program Files\WindowsApps to something in your local app data folder so I did that. My registry now looks like this:

And now wt.exe from the Run Dialog box will open the preview version of Windows Terminal. However, in making this change, App execution aliases in the Settings app no longer works. Meaning if I set the alias for Regular Terminal to On then it still opens the preview terminal. If I set the alias to Terminal Preview it of course opens the preview terminal as well. Best I can tell, by setting that registry value, App execution aliases no longer do anything. I can even set both aliases to Off and wt.exe will still open terminal preview. So that registry entry must take precedence over the app execution alias setting.
So this workaround does allow me to open the preview terminal now by using wt.exe from the command line but we broke app execution aliases in the process. Not sure what is going on here, there seem to be lot of issues similar/tangentially related to mine. Probably more an issue inside windows (and more likely something with the Store/UWP/whatever they call it now) than in terminal. Hopefully they can fix some of these bugs!
Thanks, Paul
Maybe it's a naive suggestion, but maybe it will fix the issue if you backup your settings.json and uninstall both Terminal variants (normal and Preview) and reinstall Windows Terminal Preview?
After uninstalling both applications, I was able to install the regular terminal but the store gives me an error when installing the preview. I receive Code: 0x80070005
0x80070005 is "Access is denied." (ERROR_ACCESS_DENIED). This is an issue which is about the same failure code: #12001
Figured it was something like that. Unfortunately, that user had no luck fixing the issue and just blew away his profile. Not in a position to do that right now, but may end up just reinstalling Windows soon. It's about that time anyway.
We might be stuck on our end. Can you file feedback on
/?
That might help get this to the right folks to investigate
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.