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

Running wt from "Run" dialog box doesn't work #10149

Closed
sungvzer opened this issue May 21, 2021 · 20 comments
Closed

Running wt from "Run" dialog box doesn't work #10149

sungvzer opened this issue May 21, 2021 · 20 comments
Labels
Culprit-Centennial Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Product-Terminal The new Windows Terminal. Resolution-No-Repro We couldn't get this to happen, or it stopped happening entirely.

Comments

@sungvzer
Copy link

Windows Terminal version (or Windows build number)

10.0.19042.0 1.7.1091.0

Other Software

Windows run dialog

Steps to reproduce

  • Press Windows+R to open the run dialog
  • Type "wt" or "wt.exe"
  • Press enter or ctrl+shift+enter, it doesn't launch with either

Expected Behavior

The application would launch normally when launched from a run dialog.

Actual Behavior

Open dialog closes, cursor goes to "loading" state, then everything turns back silent.
Running Get-Command wt | Select-Object -ExpandProperty Definition, it echoes back %USERPROFILE%\AppData\Local\Microsoft\WindowsApps\wt.exe, and pasting this string into the run dialog actually opens the terminal.
That path is already in the system AND user paths.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels May 21, 2021
@sungvzer
Copy link
Author

Video describing the different behaviors.

2021-05-21_17-41-49.mp4

@zadjii-msft
Copy link
Member

This feels like one of the many issues we've had with the app execution alias in the past. @DHowett is usually the best at helping get to the root cause.

@KaranKad
Copy link

This happened to me when I tried to gain access to WindowsApps folder by changing permission, after that files were all messed up inside and some store apps stopped working properly. Terminal would work when normally launched by clicking the icon but opening from run dialog did not work. My only option was to do a clean install of windows.

@DHowett
Copy link
Member

DHowett commented May 25, 2021

Unfortunately, that is one of the "NO FLY ZONES" in Windows -- editing the permissions on that folder. Sorry that happened to you!

@KaranKad
Copy link

Ah! no worries, I learnt my lesson.

@zadjii-msft
Copy link
Member

@sungvzer Could you try toggling the "App Execution Alias" for the Terminal, in the Settings App? That might just fix it for you. Otherwise, there's an option in the Settings app to "Repair" an app (Settings > Apps and Features > Terminal > Advanced Options > Repair) which might work.

@zadjii-msft zadjii-msft added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label May 28, 2021
@ghost ghost added the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Jun 1, 2021
@ghost
Copy link

ghost commented Jun 1, 2021

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.

@sungvzer
Copy link
Author

sungvzer commented Jun 2, 2021

Did both things, no success

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. labels Jun 2, 2021
@Chaphasilor
Copy link

@sungvzer Could you try toggling the "App Execution Alias" for the Terminal, in the Settings App? That might just fix it for you.

This should be in the FAQ (if it isn't already)! :D
I recently had a strange bug where I couldn't run wt.exe, even when inside the folder containing the file. Got an error that the "file doesn't exist", when it obviously did. Toggling the App Execution Alias twice fixed it for me.

@zadjii-msft
Copy link
Member

zadjii-msft commented Jan 26, 2022

Sorry for the long turnaround on these. I'm gonna try reaching out to the App Execution Alias team to see if they have more guidance here. If the Terminal can be launched just fine from the Start Menu, but specifically wt.exe doesn't work[1], then there's something outside our control that's going wrong that we'll need some help figuring out.

Usually toggling the app execution alias in the Settings app should fix this. Worst case, repairing the app via the settings app should also help. But for some reason those don't seem to help everyone, so we need to figure out what's wrong when those don't work.

In the meantime, can you share the output of icacls "C:\Program Files\WindowsApps" (from an admin shell?) Filing feedback on "Developer Platform > Desktop Bridge" might also help get some traces to the folks that own this.

image

Correct WindowsApps permissions
\Program Files\WindowsApps NT SERVICE\TrustedInstaller:(F)
                           NT SERVICE\TrustedInstaller:(OI)(CI)(IO)(F)
                           S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204:(RX)
                           S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204:(OI)(CI)(IO)(GR,GE)
                           NT AUTHORITY\SYSTEM:(F)
                           NT AUTHORITY\SYSTEM:(OI)(CI)(IO)(F)
                           BUILTIN\Administrators:(CI)(RX)
                           NT AUTHORITY\LOCAL SERVICE:(OI)(CI)(RX)
                           NT AUTHORITY\NETWORK SERVICE:(OI)(CI)(RX)
                           NT AUTHORITY\RESTRICTED:(OI)(CI)(RX)
                           BUILTIN\Users:(Rc,S,RD,REA,X,RA)

As a matter of cross-linking:

[1]: The Win+X menu is also powered by wt.exe on builds above 22000.490. Before that, it only used Windows Terminal stable. If you only have Windows Terminal Preview installed, that won't work right below that build.

@zadjii-msft
Copy link
Member

Another debugging question from the AEA team: Do any other App Execution Aliases work from the run dialog or a console window? You can find all of them in the settings app. spotify.exe, snippingtool.exe, winget.exe are all good examples.

@zadjii-msft zadjii-msft added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels Jan 27, 2022
@zadjii-msft zadjii-msft removed their assignment Jan 27, 2022
@ghost ghost added the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Jan 31, 2022
@ghost
Copy link

ghost commented Jan 31, 2022

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.

@sungvzer
Copy link
Author

sungvzer commented Feb 1, 2022

Hi, in the meantime I completely wiped the system, obviously that fixed the problem I had, so unfortunately I have no longer access to the faulty instance.

@ghost ghost added the Needs-Attention The core contributors need to come back around and look at this ASAP. label Feb 1, 2022
@ghost ghost removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. labels Feb 1, 2022
@zadjii-msft
Copy link
Member

Welp that's alright. We've clearly got more than enough other reports, we'll use one of those to track this down. Thanks for the follow-up!

@zadjii-msft zadjii-msft added the Resolution-No-Repro We couldn't get this to happen, or it stopped happening entirely. label Feb 1, 2022
@Zubbbz
Copy link

Zubbbz commented Feb 21, 2023

I also have this issue. It appears that the process starts, and shortly after, closes. I never see it appear on screen. https://youtu.be/uoBcX7uYYTg

@zadjii-msft
Copy link
Member

@Zubbbz Do you have the "App execution alias" for the Terminal enabled in the Windows Settings app?

From Start menu search, look for "App execution alias", which should take you to the Settings app:
image
image

If that's enabled, then try running where wt. If that can't find it, then either the wt App Execution Alias isn't enabled, or your %PATH% is messed up.

First try toggling the App Execution Alias for WT off then in the Settings app.

If that doesn't work, then make sure C:\Users\<your user>\AppData\Local\Microsoft\WindowsApps\ is on your PATH.

@Zubbbz
Copy link

Zubbbz commented Feb 21, 2023

image

oddly enough, since I have windows terminal set as my default terminal, even when the execution alias is off, if i run cmd from the win + r menu, it opens cmd in a windows terminal window

@zadjii-msft
Copy link
Member

image

Turn that on

@Zubbbz
Copy link

Zubbbz commented Feb 21, 2023

I just now turned it off when I took that screenshot, when I had it on, the issue persisted.

@nwalkewicz
Copy link

nwalkewicz commented Apr 7, 2023

@zadjii-msft I've been having the same issue and have too much important data to merit doing a clean install, so I'm working with a faulty wt.exe alias if you need some more diagnostics. Just so we're caught up, I tried toggling the App Execution Alias and performing an app repair via Settings, but neither worked for me. Symptoms for me are identical as the original video posted in this issue. I can't remember, but I might've messed with the permissions a while back, so I wouldn't be surprised if that was the cause. Looking back through the thread a bit, I saw you posted the correct permission for the WindowsApps folder; could you please elaborate on (or send a link that explains) the :(OI)(CI)(IO)(F)(c,S,E)... bit? I take it (F) means Full Control, then (R|W|X) mean Read|Write|Execute respectively, but I'm not familiar with the others.

Edit: I ran icacls "C:\Program Files\WindowsApps", here's my output:

C:\Program Files\WindowsApps NT SERVICE\TrustedInstaller:(OI)(CI)(F)
                             S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204:(OI)(CI)(RX)
                             NT AUTHORITY\SYSTEM:(OI)(CI)(F)
                             BUILTIN\Administrators:(CI)(RX,W)
                             NT AUTHORITY\LOCAL SERVICE:(OI)(CI)(RX)
                             NT AUTHORITY\NETWORK SERVICE:(OI)(CI)(RX)
                             NT AUTHORITY\RESTRICTED:(OI)(CI)(RX)
                             LAPTOP\Nick:(OI)(CI)(F)
                             BUILTIN\Users:(Rc,S,RD,REA,X,RA)

Successfully processed 1 files; Failed processing 0 files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Culprit-Centennial Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Product-Terminal The new Windows Terminal. Resolution-No-Repro We couldn't get this to happen, or it stopped happening entirely.
Projects
None yet
Development

No branches or pull requests

7 participants