-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
0xc0000022 startup error when opening wt from file explorer or Run window #7081
Comments
Unfortunately not.
From command prompt:
From Windows Terminal (git bash): $ where wt
C:\Users\Admin\AppData\Local\Microsoft\WindowsApps\wt.exe
C:\Program Files\WindowsApps\Microsoft.WindowsTerminalPreview_1.2.2022.0_x64__8wekyb3d8bbwe\wt.exe I guess the preview shouldn't be there? And why would it only show up when called from the Windows Terminal? I thought this was because of git bash so I changed directory into the same folder as before with Windows Terminal, but the output from git bash is kind of different: $ where wt
C:\Users\Admin\AppData\Local\Microsoft\WindowsApps\wt.exe
(base) Also opening from the cmd prompt by typing Also trying to open $ wt
bash: /c/Users/Admin/AppData/Local/Microsoft/WindowsApps/wt: Permission denied
(base) |
If you turn the non-preview one off and the preview one on, does the behavior change? |
I uninstalled the Preview version and now everything seems to work.
It didn't. I restarted, tried again and it was the same error. Only difference was |
This is very strange. Thank you for reporting. Just to confirm: now that you've removed preview, it works fine? That is very unexpected 😄 |
Yes, it's been working fine since I removed Preview. Seems weird, but I'm just happy everything's working 🥰 . Also since it seems tab renaming has hit stable, Preview lost the major thing I've been using it for, so all is good now in my book. |
Thanks for following up! I'm gonna close this out as not reproducing, but please do let me know if it comes back. |
This usually happens when you change the permissions on Given that you had no trouble accessing that folder, consider restoring the permissions and removing and reinstalling all instances of Terminal so that they get put back with the correct permissions. |
This is crazyyy. I did a restore first with and then without keeping data, but the WindowsApps permissions problem was still there, where the Windows Store or any other built-in app for that matter would not turn on. I am now very finickly at a reverse stage where it works when called from the explorer, but doesn't (incorrect parameter) when called from a shortcut. I have no idea how a permission problem can persist after system reinstall. This is crazy. I guess somehow it's in the cloud in my Windows user profile... 🤷 EDIT: Is there a way something could have persisted if I chose to restore the system? Is it identical to a clean install cause I want to get rid of this for goood EDIT2: 🎉 solution as simple as drive format, ez fix 😄 |
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 |
I too started getting this error out of the blue this morning no updates have been applied (to my knowledge) worked yesterday afternoon, I've already spent 1-2hours trying to figure it out. My answer is just to abandon the terminal all together this is the second time I have ran into issues with it that has led to multiple hours of troubleshooting, at this point the benefits of wt are no longer worth the technical debt |
The WindowsTerminal.exe is still available, but wt.exe just won't work and returns to me a 0xc0000022 error. Also, OpenConsole.exe returns to me the same error. It is amazing that, in shell (any shell including cmd, pwsh...), command "wt" worked well. But it just won't work with double click or Win+R run |
Then I can run |
Great workaround! Wouldn't be surprised if a future update breaks this folder too though |
Happened to me again as well. Same thing as last time, taking ownership of the folder the app is in fixed the issue |
A solution I found- |
Changing the registry path worked like a charm. Since it points to an AppData folder, I think this should be the default as we wouldn't ever have to worry about security bugs like this |
App packages are installed and registered per-user; this is the only effective way to give users specific control over which app package is invoked :) |
Ok. Also it broke again so I retract my previous statement. Don't know why it only worked once or twice, registry entries are still the new value so idk what is going on anymore |
This worked perfectly!!!!!!!!! Tried literally everything else in this thread only more problems, but this worked |
This worked perfectly! |
For anyone else who messed up their WindowsApps permissions running the command above, running the script at https://github.com/AgentRev/WindowsAppsUnfukker made everything (mostly) well again. Except now Windows Store thinks Terminal Preview is installed while it cannot be found via Start Menu or Add/Remove Programs. (It is, in fact, installed.) |
This method works for me. I found that But I find other items in |
@liudonghua123 Thank you so much! |
This method works for me. |
Why won't Microsoft fix this registry issue on Windows Terminal installation? |
I've run into this issue as well, reproducibly, by building a Hyper-V VM with Vagrant, the "gusztavvargadr/windows-10-22h2-enterprise-nocm" base box, chocolatey, and
|
Thank you! It's working now |
Environment
Found this in my PATH:
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, orRun
window.It works if I search for
wt
and open it. Also works if I navigate toC:\Users\<USERNAME>\AppData\Local\Microsoft\WindowsApps
and run it manually. Doesn't work though from both theRun
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
The text was updated successfully, but these errors were encountered: