Opening wt.exe from WindowsApps in Program Files Causing Error 22 #16966

Closed
opened 2026-01-31 05:28:38 +00:00 by claunia · 6 comments
Owner

Originally created by @sapphired18 on GitHub (Mar 10, 2022).

Windows Terminal version

1.12.10393.0

Windows build number

10.0.22000.556

Other Software

oh my posh

Steps to reproduce

Open Windows Terminal Installation folder (in c:\program files\WindowsApps)
Run wt.exe from that folder
WT returns error 22
Now I can't run wt.exe from Win+R or search and open wt.exe

(I know its stupid)

Expected Behavior

No response

Actual Behavior

wt.exe returns error 22

Originally created by @sapphired18 on GitHub (Mar 10, 2022). ### Windows Terminal version 1.12.10393.0 ### Windows build number 10.0.22000.556 ### Other Software oh my posh ### Steps to reproduce Open Windows Terminal Installation folder (in c:\program files\WindowsApps) Run wt.exe from that folder WT returns error 22 Now I can't run wt.exe from Win+R or search and open wt.exe (I know its stupid) ### Expected Behavior _No response_ ### Actual Behavior wt.exe returns error 22
Author
Owner

@zadjii-msft commented on GitHub (Mar 10, 2022):

Why are you trying to run the things in WindowsApps directly? There's a pile of permissions on those files that are designed to stop you from doing that, and changing those also can randomly break other things. See #9452 and https://github.com/microsoft/terminal/issues?q=is%3Aissue+label%3ACulprit-Centennial+ in general.

@zadjii-msft commented on GitHub (Mar 10, 2022): Why are you trying to run the things in `WindowsApps` directly? There's a pile of permissions on those files that are designed to stop you from doing that, and changing those also can randomly break other things. See #9452 and https://github.com/microsoft/terminal/issues?q=is%3Aissue+label%3ACulprit-Centennial+ in general.
Author
Owner

@sapphired18 commented on GitHub (Mar 10, 2022):

fixed by reinstalling from sideloading and using WindowsAppsUnfukker

@sapphired18 commented on GitHub (Mar 10, 2022): fixed by reinstalling from sideloading and using WindowsAppsUnfukker
Author
Owner

@sapphired18 commented on GitHub (Mar 13, 2022):

image
the culprit are this, retoggling Windows terminal causing certain registry to C:\Program Files\WindowsApp folder, not C:\Users<username>\AppData\Local\Microsoft\Windows\WindowsApp

@sapphired18 commented on GitHub (Mar 13, 2022): ![image](https://user-images.githubusercontent.com/58063311/158046120-3f7c05be-6c66-406e-b17c-f74cb4b06724.png) the culprit are this, retoggling Windows terminal causing certain registry to C:\Program Files\WindowsApp folder, not C:\Users\<username>\AppData\Local\Microsoft\Windows\WindowsApp
Author
Owner

@sapphired18 commented on GitHub (Mar 13, 2022):

i already create new local account and then retoggling it caused registry value to wrong address

@sapphired18 commented on GitHub (Mar 13, 2022): i already create new local account and then retoggling it caused registry value to wrong address
Author
Owner

@sapphired18 commented on GitHub (Mar 13, 2022):

here's the video showcasing the bug?
https://youtu.be/6yyqAJv8lQA

@sapphired18 commented on GitHub (Mar 13, 2022): here's the video showcasing the bug? https://youtu.be/6yyqAJv8lQA
Author
Owner

@sapphired18 commented on GitHub (Mar 13, 2022):

oh, i am wrong, running icacls "C:\Program Files\WindowsApps" /reset /t /c /q with powershell in SYSTEM user fix it

@sapphired18 commented on GitHub (Mar 13, 2022): oh, i am wrong, running `icacls "C:\Program Files\WindowsApps" /reset /t /c /q` with powershell in SYSTEM user fix it
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#16966