terminal: 0xc0000022 startup error when opening wt from file explorer or Run window
Environment
Windows build number: Microsoft Windows [Version 10.0.18363.959]
Windows Terminal version (if applicable): 1.1.2021.0
Any other software?
Found this in my PATH:
%USERPROFILE%\AppData\Local\Microsoft\WindowsApps
Alias settings:

I tried turning my computer off and on again 😉 This error started popping up very recently, maybe I could try to install an old version to try to find the one that triggers this. I install from Windows Store, and don’t really know how to do that.
I think this shows the time of last update:
I think the time when the bug started to appear might coincide.
Steps to reproduce
Type wt in the file explorer, or Run window.
It works if I search for wt and open it. Also works if I navigate to C:\Users\<USERNAME>\AppData\Local\Microsoft\WindowsApps and run it manually. Doesn’t work though from both the Run window and file explorer.
I also tried typing wt in the Run window, then pressing Ctrl+Shift+Enter, a popup appeared to ask for permission, but the same error appeared after allowing.
Expected behavior
It opens.
Actual behavior
I get 0xc0000022 error

About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 50 (6 by maintainers)
A solution I found- changing the values in the following registries: Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\wt.exe from the C:\Program Files\WindowsApps\ path, to the path in C:\Users\USERNAME\AppData\Local\Microsoft\WindowsApps\
I was able to fix the issue by resetting permissions to the WindowsApps folder. wt works as expected after running the command below in an elevated PowerShell:
icacls "C:\Program Files\WindowsApps" /reset /t /c /qThis method works for me. I found that
"C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.11.3471.0_x64__8wekyb3d8bbwe\wt.exe"is a uwp, and can not directly run. You should run%LOCALAPPDATA%\Microsoft\WindowsApps\wt.exe(It’s a zero sized file, maybe called app execution alias) instead.But I find other items in
Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\App Pathsare using path likeC:\Program Files\WindowsApps\MicrosoftCorporationII.WindowsSubsystemforLinux_0.51.3.0_x64__8wekyb3d8bbwe.icaclsnot working, but I found a workaround:Then I can run
wtfromRunwindow.@KyleCrowley oh yeah that makes sense to me now. because reinstalling windows is like using SYSTEM to do stuff.
psexec.exe -s -i cmdI thought this issue was my SSD breaking up files since it has signs of making files incorrectly usable (a jar file broken).
So I went through a
DISM,SFC,DSKCHKbut they aren’t working at all.Plus upgrading to 20H2 doesn’t seem to fix it since upgrading windows will reinstall drivers, Windows apps.
Edit:
My problem is that I’m afraid I messed up the permissions of
WindowsAppsandMicrosoft.WindowsTerminal_versionNumber_arch__probablyGUIDOrSomethingwithout notices and I don’t want to mess up the permissions of WindowsApps anymore so I got a fix for this:Use powershell under Administrator and run
Remove-AppxPackage [Whatever is the full name of the Windows Terminal package name is for example: Microsoft.WindowsTerminal_1.3.2651.0_x64__8wekyb3d8bbwe].This will ACTUALLY DELETE the program’s folder and not keeping the app files when uninstalling them in Settings app.
Go back to Microsoft Store and reinstall it and you’re done.
Suddenly got this issue as well,
without touching my installationafter updating through the StoreHowever, @dexeonify’s steps have helped. To be exact, taking ownership of the Windows Terminal folder in C:\Program Files\WindowsApps fixed the problem
Please consider reopening this issue
I am getting this issue starting this morning. Windows updated something (I think security related) and when I booted up I get the same error. Unfortunately for me, drive formatting isn’t really an option as it’s just not worth it.
Currently I’m just switching back to powershell, but it would be nice if there was a fix/solution for this
Thanks for following up! I’m gonna close this out as not reproducing, but please do let me know if it comes back.