Cannot open any terminal (cmd, powershell, WSL) - Error 0xd0000022 #7576

Closed
opened 2026-01-31 01:07:39 +00:00 by claunia · 8 comments
Owner

Originally created by @nedy13 on GitHub (Apr 23, 2020).

Environment

Windows build number: Microsoft Windows [Version 10.0.18362.719]
Windows Terminal version (if applicable): 0.11.1121.0 (any)

Any other software?
I do not know which software is still relevant and which dependencies are present. On my notebook Visual Studio Code, Visual Studio 2019 is installed for example. Also we are using McAfee. Don't know if a background update breaks anything.

Steps to reproduce

no steps known

Expected behavior

Can use Terminal app, again.

Actual behavior

I have been using the Windows terminal for a few months now. Overnight, no terminal opens. This error always appears for every console.
The only thing I did before, I had installed / updated Google Chrome and Mattermost from our software repository (SCCM).

[Fehler 0xd0000022 beim Start von cmd.exe'] [Fehler 0xd0000022 beim Start von powershell.exe']
[Fehler 0xd0000022 beim Start von `wsl.exe -d Ubuntu']

image

I used Terminal version v0.7.3291.0 and updated to the latest version. Nothing changed. I uninstalled and reinstalled Terminal app. I deleted my settings.json (profiles.json).

Unfortunately it is a company computer (domain computer), so I cannot keep track of all changes (group policies, etc.).

But one thing is very interesting. If I start the Terminal App as administrator, then it works.

I tried to analyse the difference with help of "procmon", but didn't find a hint.

I hope someone can give me an advice, what I can try or analyse. No option is to reset my Windows profile or reinstalling Windows.

Best regards,
Rene

Originally created by @nedy13 on GitHub (Apr 23, 2020). # Environment ```none Windows build number: Microsoft Windows [Version 10.0.18362.719] Windows Terminal version (if applicable): 0.11.1121.0 (any) Any other software? I do not know which software is still relevant and which dependencies are present. On my notebook Visual Studio Code, Visual Studio 2019 is installed for example. Also we are using McAfee. Don't know if a background update breaks anything. ``` # Steps to reproduce no steps known # Expected behavior Can use Terminal app, again. # Actual behavior I have been using the Windows terminal for a few months now. Overnight, no terminal opens. This error always appears for every console. The only thing I did before, I had installed / updated Google Chrome and Mattermost from our software repository (SCCM). [Fehler 0xd0000022 beim Start von `cmd.exe'] [Fehler 0xd0000022 beim Start von `powershell.exe'] [Fehler 0xd0000022 beim Start von `wsl.exe -d Ubuntu'] ![image](https://user-images.githubusercontent.com/4283170/80069805-429ad300-8542-11ea-9050-20a4ae4cf51b.png) I used Terminal version v0.7.3291.0 and updated to the latest version. Nothing changed. I uninstalled and reinstalled Terminal app. I deleted my settings.json (profiles.json). Unfortunately it is a company computer (domain computer), so I cannot keep track of all changes (group policies, etc.). But one thing is very interesting. If I start the Terminal App as administrator, then it works. I tried to analyse the difference with help of "procmon", but didn't find a hint. I hope someone can give me an advice, what I can try or analyse. No option is to reset my Windows profile or reinstalling Windows. Best regards, Rene
claunia added the Needs-TriageNeeds-Tag-FixNeeds-Attention labels 2026-01-31 01:07:39 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Apr 23, 2020):

This looks like the error message that is generated when CMD or PowerShell is configured to “always launch as administrator.” Is that so?

@DHowett-MSFT commented on GitHub (Apr 23, 2020): This looks like the error message that is generated when CMD or PowerShell is configured to “always launch as administrator.” Is that so?
Author
Owner

@nedy13 commented on GitHub (Apr 24, 2020):

Hi @DHowett-MSFT ,

thank you very much for your response.
I am not aware of such kind of option in Windows. After some research there are only some hacks to configure an always run CMD as Admin option. Your thought seems a valid reason, but don't looks so.
I also think the issue has something to do with a broken dependency or registry entry, etc. but I don't know how to analyse / find it.
I also don't find any log option for Terminal application.
Does somebody know a debug output logfile option?

@nedy13 commented on GitHub (Apr 24, 2020): Hi @DHowett-MSFT , thank you very much for your response. I am not aware of such kind of option in Windows. After some research there are only some hacks to configure an always run CMD as Admin option. Your thought seems a valid reason, but don't looks so. I also think the issue has something to do with a broken dependency or registry entry, etc. but I don't know how to analyse / find it. I also don't find any log option for Terminal application. Does somebody know a debug output logfile option?
Author
Owner

@DHowett-MSFT commented on GitHub (Apr 25, 2020):

Unfortunately, there isn't a really good debugging option that we could use to figure out where Terminal is going wrong. It looks like it's pretty early in our startup process ... do you have antivirus software, and are you seeing any alerts about something called "openconsole.exe"?

@DHowett-MSFT commented on GitHub (Apr 25, 2020): Unfortunately, there isn't a really good debugging option that we could use to figure out where Terminal is going wrong. It looks like it's pretty early in our startup process ... do you have antivirus software, and are you seeing any alerts about something called "openconsole.exe"?
Author
Owner

@nedy13 commented on GitHub (Apr 27, 2020):

Hi @DHowett-MSFT,

I think you were completely right in your first assumption. Seems that the cmd is always started as administrator. I installed Windows Terminal at some VMs, which are also member of our domain. The Terminal is working, but you can see in the header line that the processes are executed in admin mode. The difference between the VMs and my Computer is that the UAC is disabled at the VMs, so the Terminal app works.

I haven't figured out exactly how they changed it, so I could revert the setting, but now I know the problem.

Thanks a lot for your help! I will close the issue.

Best regards,
Rene

@nedy13 commented on GitHub (Apr 27, 2020): Hi @DHowett-MSFT, I think you were completely right in your first assumption. Seems that the cmd is always started as administrator. I installed Windows Terminal at some VMs, which are also member of our domain. The Terminal is working, but you can see in the header line that the processes are executed in admin mode. The difference between the VMs and my Computer is that the UAC is disabled at the VMs, so the Terminal app works. I haven't figured out exactly how they changed it, so I could revert the setting, but now I know the problem. Thanks a lot for your help! I will close the issue. Best regards, Rene
Author
Owner

@DHowett-MSFT commented on GitHub (Apr 27, 2020):

I'm glad you could figure it out! You may be able to configure the "run as administrator" option in the "Properties" for the cmd.exe shortcut that comes with Windows. I don't know if that will help, but it might be a good place to start.
Best of luck. If you find a solution, I'd love to know what it is: it can help other people 😄

@DHowett-MSFT commented on GitHub (Apr 27, 2020): I'm glad you could figure it out! You may be able to configure the "run as administrator" option in the "Properties" for the cmd.exe shortcut that comes with Windows. I don't know if that will help, but it might be a good place to start. Best of luck. If you find a solution, I'd love to know what it is: it can help other people :smile:
Author
Owner

@nedy13 commented on GitHub (Apr 27, 2020):

I read about this kind of possibility, but unfortunately this mechanism is not used.

image

I'll share my findings when I figure it out.

Have a nice day!

@nedy13 commented on GitHub (Apr 27, 2020): I read about this kind of possibility, but unfortunately this mechanism is not used. ![image](https://user-images.githubusercontent.com/4283170/80353221-56617480-8875-11ea-9a31-49deeaae33e6.png) I'll share my findings when I figure it out. Have a nice day!
Author
Owner

@kbrilla commented on GitHub (Jul 7, 2020):

guys I found solution!
basicly go to C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.0.1811.0_x64__8wekyb3d8bbwe //or wherever You app is instaled

copy the content to another folder, somewhere where You definitely have access to modify, i used new folder on my desktop

last step run WindowsTerminal.exe from that folder as admin.

image

@kbrilla commented on GitHub (Jul 7, 2020): guys I found solution! basicly go to C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.0.1811.0_x64__8wekyb3d8bbwe //or wherever You app is instaled copy the content to another folder, somewhere where You definitely have access to modify, i used new folder on my desktop last step run WindowsTerminal.exe from that folder as admin. ![image](https://user-images.githubusercontent.com/22288449/86794442-d3c31580-c06c-11ea-9b61-f76fa19e6385.png)
Author
Owner

@ochcaroline commented on GitHub (Jul 9, 2020):

@criskrzysiu The solution is definitely not good, as I don't want to run powershell or cmd as admin every time.
Changing the directory did not work for me.

I am not running powershell as an admin by default

@ochcaroline commented on GitHub (Jul 9, 2020): @criskrzysiu The solution is definitely not good, as I don't want to run powershell or cmd as admin every time. Changing the directory did not work for me. I am not running powershell as an admin by default
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7576