WT command open a different version terminal #16823

Closed
opened 2026-01-31 05:24:05 +00:00 by claunia · 11 comments
Owner

Originally created by @0resan on GitHub (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.

Originally created by @0resan on GitHub (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](https://user-images.githubusercontent.com/30792262/154809107-a37e309b-6f51-44a1-814e-24c44852a128.png) 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](https://user-images.githubusercontent.com/30792262/154809136-78682808-aeba-4d9d-a5bf-f1881c2877b0.png) ### 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](https://user-images.githubusercontent.com/30792262/154809196-93a156c2-7df8-4b06-ba20-bb07a2df7287.png) So I have to copy one of them to another folder. It realy make me confuse.
claunia added the Issue-BugResolution-Duplicate labels 2026-01-31 05:24:06 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Feb 22, 2022):

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 commented on GitHub (Feb 22, 2022): 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?
Author
Owner

@DHowett commented on GitHub (Feb 22, 2022):

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

@DHowett commented on GitHub (Feb 22, 2022): This could also be due to a permission issue on the `WindowsApps` directory. Can you follow the remediation steps in #9452?
Author
Owner

@0resan commented on GitHub (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

@0resan commented on GitHub (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](https://user-images.githubusercontent.com/30792262/155263703-e79e6d8b-92eb-4c03-8658-5f7f94fbf0b6.png)
Author
Owner

@0resan commented on GitHub (Feb 23, 2022):

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

@0resan commented on GitHub (Feb 23, 2022): @DHowett Here ie the output . ![Screenshot 2022-02-23 125954](https://user-images.githubusercontent.com/30792262/155265132-2eedf2fb-0d88-4dd9-82b5-5ef7fbc52f85.png)
Author
Owner

@zadjii-msft commented on GitHub (Feb 23, 2022):

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 commented on GitHub (Feb 23, 2022): 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`?
Author
Owner

@0resan commented on GitHub (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

@0resan commented on GitHub (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](https://user-images.githubusercontent.com/30792262/155361488-adcc4cf1-ec74-4606-ad01-9b008731d651.png)
Author
Owner

@zadjii-msft commented on GitHub (Feb 24, 2022):

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

@zadjii-msft commented on GitHub (Feb 24, 2022): > 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
Author
Owner

@ghost commented on GitHub (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 commented on GitHub (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!
Author
Owner

@0resan commented on GitHub (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 .

@0resan commented on GitHub (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 .
Author
Owner

@DHowett commented on GitHub (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 :)

@DHowett commented on GitHub (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 :)
Author
Owner

@0resan commented on GitHub (Feb 26, 2022):

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

@0resan commented on GitHub (Feb 26, 2022): @DHowett Yeah,it worked. Thank you for this command !
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#16823