Always crashes with 0xc0000022 #12888

Closed
opened 2026-01-31 03:28:09 +00:00 by claunia · 9 comments
Owner

Originally created by @alancnet on GitHub (Mar 6, 2021).

Originally assigned to: @DHowett on GitHub.

Environment

Windows build number: Win32NT             10.0.19041.0 Microsoft Windows NT 10.0.19041.0
Windows Terminal version (if applicable): 1.6.10571.0

Any other software? WSL2

Steps to reproduce

  1. Install Windows Terminal
  2. Run Windows Terminal
    image

Expected behavior

I am expecting Windows Terminal to launch

Actual behavior

Windows Terminal always fails with

---------------------------
wt.exe - Application Error
---------------------------
The application was unable to start correctly (0xc0000022). Click OK to close the application. 
---------------------------
OK   
---------------------------

This happens regardless of the version I install, or the method I use to install, including Microsoft Store, chocolatey, or Github Releases.
I've also cleared out my user settings to no avail.

Originally created by @alancnet on GitHub (Mar 6, 2021). Originally assigned to: @DHowett on GitHub. <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: Win32NT 10.0.19041.0 Microsoft Windows NT 10.0.19041.0 Windows Terminal version (if applicable): 1.6.10571.0 Any other software? WSL2 ``` # Steps to reproduce 1. Install Windows Terminal 2. Run Windows Terminal ![image](https://user-images.githubusercontent.com/2042102/110213150-ad4fb700-7e53-11eb-8d3b-b5ab36504b49.png) # Expected behavior I am expecting Windows Terminal to launch # Actual behavior Windows Terminal always fails with ``` --------------------------- wt.exe - Application Error --------------------------- The application was unable to start correctly (0xc0000022). Click OK to close the application. --------------------------- OK --------------------------- ``` This happens regardless of the version I install, or the method I use to install, including Microsoft Store, chocolatey, or Github Releases. I've also cleared out my user settings to no avail.
claunia added the Resolution-DuplicateCulprit-Centennial labels 2026-01-31 03:28:09 +00:00
Author
Owner

@alancnet commented on GitHub (Mar 6, 2021):

I continued to investigate this issue, and used Process Explorer to see what was going on. I got Access Denied on vcruntime140.dll in C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.6.10571.0_x64__8wekyb3d8bbwe. Notably, Users lacked the execution privilege, so I took ownership of the file (previously owned by SYSTEM) and added Full Control to users. This resolved the issue.. but it is still a mystery to me how this could happen.

@alancnet commented on GitHub (Mar 6, 2021): I continued to investigate this issue, and used Process Explorer to see what was going on. I got Access Denied on `vcruntime140.dll` in `C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.6.10571.0_x64__8wekyb3d8bbwe`. Notably, Users lacked the execution privilege, so I took ownership of the file (previously owned by SYSTEM) and added Full Control to users. This resolved the issue.. but it is still a mystery to me how this could happen.
Author
Owner

@zadjii-msft commented on GitHub (Mar 8, 2021):

@DHowett is this another one of those deployment issues we've been seeing?

Taking full permission of something in .../WindowsApps is probably not the best long term solution, but it's certainly weird that this was happening at all

@zadjii-msft commented on GitHub (Mar 8, 2021): @DHowett is this another one of those deployment issues we've been seeing? Taking full permission of something in `.../WindowsApps` is probably not the _best_ long term solution, but it's certainly weird that this was happening at all
Author
Owner

@sungvzer commented on GitHub (Mar 8, 2021):

I'd like to add that, while running WindowsTerminal.exe or wt.exe from explorer results in a failure, running it from the Search Bar or an already running instance of wt or pwsh makes it run properly.

If I try to edit my permissions in Explorer, I get an "Access control entry is corrupt" kind of error.

@sungvzer commented on GitHub (Mar 8, 2021): I'd like to add that, while running WindowsTerminal.exe or wt.exe from explorer results in a failure, running it from the Search Bar or an already running instance of wt or pwsh makes it run properly. If I try to edit my permissions in Explorer, I get an "Access control entry is corrupt" kind of error.
Author
Owner

@DHowett commented on GitHub (Mar 11, 2021):

This points to a permissions issue on WindowsApps itself -- not the Terminal directory.

Can you share the output of ...

icacls "\Program Files\WindowsApps"

?

From an admin shell, of course.

Mine are:

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

These are the expected permissions. Anything else somewhat contravenes expectations and can cause all sorts of app activation issues.

@DHowett commented on GitHub (Mar 11, 2021): This points to a permissions issue on `WindowsApps` itself -- not the Terminal directory. Can you share the output of ... ``` icacls "\Program Files\WindowsApps" ``` ? From an admin shell, of course. Mine are: ``` \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) ``` These are the expected permissions. Anything else somewhat contravenes expectations and can cause all sorts of app activation issues.
Author
Owner

@sungvzer commented on GitHub (Mar 11, 2021):

There it is!

C:\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)(RX)
                              NT AUTHORITY\SYSTEM:(F)
                              NT AUTHORITY\SYSTEM:(OI)(CI)(IO)(F)
                              BUILTIN\Administrators:(CI)(RX)
                              NT AUTHORITY\SERVIZIO LOCALE:(OI)(CI)(RX)
                              NT AUTHORITY\SERVIZIO DI RETE:(OI)(CI)(RX)
                              NT AUTHORITY\RESTRIZIONI:(OI)(CI)(RX)
                              BUILTIN\Users:(Rc,S,RD,REA,X,RA)
                              SALVIO\Salvio:(OI)(CI)(F)
@sungvzer commented on GitHub (Mar 11, 2021): There it is! ``` C:\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)(RX) NT AUTHORITY\SYSTEM:(F) NT AUTHORITY\SYSTEM:(OI)(CI)(IO)(F) BUILTIN\Administrators:(CI)(RX) NT AUTHORITY\SERVIZIO LOCALE:(OI)(CI)(RX) NT AUTHORITY\SERVIZIO DI RETE:(OI)(CI)(RX) NT AUTHORITY\RESTRIZIONI:(OI)(CI)(RX) BUILTIN\Users:(Rc,S,RD,REA,X,RA) SALVIO\Salvio:(OI)(CI)(F) ```
Author
Owner

@DHowett commented on GitHub (Mar 11, 2021):

If you remove SALVIO\Salvio (icacls "C:\Program Files\WindowsApps" /remove SALVIO\Salvio), does the issue go away?

@DHowett commented on GitHub (Mar 11, 2021): If you remove `SALVIO\Salvio` (`icacls "C:\Program Files\WindowsApps" /remove SALVIO\Salvio`), does the issue go away?
Author
Owner

@DHowett commented on GitHub (Mar 12, 2021):

I'm gonna close this one out in favor of /dup #9452 -- please follow up there with the permissions discussion. I'd love to know if that helps, because if it does we can put together a FAQ document.

@DHowett commented on GitHub (Mar 12, 2021): I'm gonna close this one out in favor of /dup #9452 -- please follow up there with the permissions discussion. I'd love to know if that helps, because if it does we can put together a FAQ document.
Author
Owner

@ghost commented on GitHub (Mar 12, 2021):

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 (Mar 12, 2021): 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

@TheWhatis commented on GitHub (Oct 19, 2021):

Just create file wte.bat (or other filename.bat), write in it
@echo off
%USERPROFILE%\AppData\Local\Microsoft\WindowsApps\wt.exe
write a path your file in variable the PATH and open terminal from "run" with command wte (or other filename). ( Sorry for my English, I'm just starting to learn it XD )

@TheWhatis commented on GitHub (Oct 19, 2021): Just create file wte.bat (or other filename.bat), write in it `@echo off` `%USERPROFILE%\AppData\Local\Microsoft\WindowsApps\wt.exe` write a path your file in variable the PATH and open terminal from "run" with command wte (or other filename). ( Sorry for my English, I'm just starting to learn it XD )
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#12888