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

WT command open a different version terminal #12534

Closed
0resan opened this issue Feb 19, 2022 · 11 comments
Closed

WT command open a different version terminal #12534

0resan opened this issue Feb 19, 2022 · 11 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@0resan
Copy link

0resan commented Feb 19, 2022

Windows Terminal version

1.12.10393.0

Windows build number

10.0.19044.1469

Other Software

No response

Steps to reproduce

Screenshot 2022-02-19 233637
Click start menu open the terminal ,it will open 'Windows Terminal Version: 1.12.10393.0 '.
But when i use run window input 'wt',it will open 'Terminal (Unpackaged)Version: 1.12.220208003-release1.12'.
Screenshot 2022-02-19 233748

Expected Behavior

No response

Actual Behavior

I use thirdparty software everything to search settings.json,and I get two result:
Screenshot 2022-02-20 000447
So I have to copy one of them to another folder. It realy make me confuse.

@0resan 0resan added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Feb 19, 2022
@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 Feb 19, 2022
@zadjii-msft
Copy link
Member

Did you install the Terminal from both scoop and the Windows Store?

scoop installs the Terminal "unpackaged" which is slightly different and uses a different path for the settings file. This issue has notes of #12545 and #11777 in it...

What's the PATH when you run the Terminal from the Run Dialog, vs when it's running from the Start Menu? What does where wt output from the Run Dialog, vs the Start Menu?

@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 Feb 22, 2022
@DHowett
Copy link
Member

DHowett commented Feb 22, 2022

This could also be due to a permission issue on the WindowsApps directory. Can you follow the remediation steps in #9452?

@0resan
Copy link
Author

0resan commented Feb 23, 2022

@zadjii-msft I just get them from Windows Store (Lastest version download from Github releases).
Here is the echo %path% and where wt output .
1

@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 labels Feb 23, 2022
@0resan
Copy link
Author

0resan commented Feb 23, 2022

@DHowett Here ie the output .
Screenshot 2022-02-23 125954

@zadjii-msft
Copy link
Member

Well yep that'll do it. Something messed with the permissions on the WindowsApps folder, which it should ABSOLUTELY NEVER DO. The output should have looked something like:

\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)

but those extra permissions are what's breaking the alias here. Did you do something to change the permissions on WindowsApps?

@zadjii-msft zadjii-msft added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels Feb 23, 2022
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Feb 23, 2022
@0resan
Copy link
Author

0resan commented Feb 23, 2022

@zadjii-msft I think I change the Owner before .
So I change it back to SYSTEM and Disable inheritance .
Now it looks like the picture below .

image

@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 labels Feb 23, 2022
@zadjii-msft
Copy link
Member

I think I change the Owner before

FYI don't do that - that kind of thing is likely to break all sorts of random bits of the OS.

That still doesn't look like the right permissions to me. I honestly don't know how to set it back to the original ones, I certainly don't know enough about ACLs to help fix that. Maybe @eryksun does.

(since this is fundamentally the same root cause as #9452 I'm gonna close this as a dupe. We can still continue the discussion here though)

/dup #9452

@ghost
Copy link

ghost commented Feb 24, 2022

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Attention The core contributors need to come back around and look at this ASAP. labels Feb 24, 2022
@0resan
Copy link
Author

0resan commented Feb 25, 2022

@zadjii-msft I am so regret did that . Maybe I should try to re-install OS . :(
Anyway thank you for your support . I will never realizing what happened with my terminal without your help .

@DHowett
Copy link
Member

DHowett commented Feb 25, 2022

@0resan you may be able to restore the permissions using cacls like this

Admin Command Prompt

takeown "C:\Program Files\WindowsApps"
cacls "C:\Program Files\WindowsApps" /S:"D:PAI(A;;FA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464)(A;OICIIO;GA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464)(A;;0x1200a9;;;S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204)(A;OICIIO;GXGR;;;S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204)(A;;FA;;;SY)(A;OICIIO;GA;;;SY)(A;CI;0x1200a9;;;BA)(A;OICI;0x1200a9;;;LS)(A;OICI;0x1200a9;;;NS)(A;OICI;0x1200a9;;;RC)(XA;;0x1200a9;;;BU;(Exists WIN://SYSAPPID))"

This will replace all of the ACLs on WindowsApps with the "default" ones that I just pulled from a working system.

I cannot guarantee that it solves your problem... but it might :)

@0resan
Copy link
Author

0resan commented Feb 26, 2022

@DHowett Yeah,it worked. Thank you for this command !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

3 participants