error 0x80070005 when launching `cmd.exe' #10022

Closed
opened 2026-01-31 02:10:23 +00:00 by claunia · 10 comments
Owner

Originally created by @mapitman on GitHub (Aug 5, 2020).

Environment

Windows build number: 10.0.19041.0
Windows Terminal version: 1.1.2021.0

Any other software?

Steps to reproduce

Open Windows Terminal, open a new tab with Command Prompt

Expected behavior

A new tab with a running cmd shell

Actual behavior

New tab opens with

[error 0x80070005 when launching `cmd.exe']

Notes

I updated to this version of Windows from a previous version (not sure of the exact build number, but it was Windows 10 1909). Windows Terminal was working properly before the update. I can run a cmd shell directly, just not from Windows Terminal. I have seen references to this error code in relation to WSL, but WSL works fine with Windows Terminal on my machine.

Things I've already tried

  1. Reboot
  2. Uninstall/reinstall Windows Terminal
  3. Delete C:\Users\xxx\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe
Originally created by @mapitman on GitHub (Aug 5, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 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: 10.0.19041.0 Windows Terminal version: 1.1.2021.0 Any other software? ``` # Steps to reproduce Open Windows Terminal, open a new tab with Command Prompt # Expected behavior A new tab with a running cmd shell # Actual behavior New tab opens with ```none [error 0x80070005 when launching `cmd.exe'] ``` # Notes I updated to this version of Windows from a previous version (not sure of the exact build number, but it was Windows 10 1909). Windows Terminal was working properly before the update. I can run a cmd shell directly, just not from Windows Terminal. I have seen references to this error code in relation to WSL, but WSL works fine with Windows Terminal on my machine. # Things I've already tried 1. Reboot 1. Uninstall/reinstall Windows Terminal 1. Delete C:\Users\xxx\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe
claunia added the Needs-Tag-FixNeeds-Attention labels 2026-01-31 02:10:23 +00:00
Author
Owner

@DHowett commented on GitHub (Aug 5, 2020):

Does this apply only to the Command Prompt profile, or does it happen for all of your profiles?

@DHowett commented on GitHub (Aug 5, 2020): Does this apply only to the _Command Prompt_ profile, or does it happen for all of your profiles?
Author
Owner

@mapitman commented on GitHub (Aug 5, 2020):

Just Command Prompt. I am also checking with our IT staff to see if it is possible that Carbon Black Defense is blocking this. Although it was working earlier today before I updated to the new Windows build.

@mapitman commented on GitHub (Aug 5, 2020): Just Command Prompt. I am also checking with our IT staff to see if it is possible that Carbon Black Defense is blocking this. Although it was working earlier today before I updated to the new Windows build.
Author
Owner

@mapitman commented on GitHub (Aug 5, 2020):

After installing a Visual Studio update and rebooting, this suddenly started working again. Not sure what happened 🤷‍♂️

@mapitman commented on GitHub (Aug 5, 2020): After installing a Visual Studio update and rebooting, this suddenly started working again. Not sure what happened 🤷‍♂️
Author
Owner

@DHowett commented on GitHub (Aug 6, 2020):

Wow, that's quite unexpected. Thanks/sorry!

@DHowett commented on GitHub (Aug 6, 2020): Wow, that's quite unexpected. Thanks/sorry!
Author
Owner

@mapitman commented on GitHub (Aug 7, 2020):

For future visitors, this was indeed caused by anti-virus/anti-malware software blocking Windows Terminal from executing cmd.exe.

@mapitman commented on GitHub (Aug 7, 2020): For future visitors, this was indeed caused by anti-virus/anti-malware software blocking Windows Terminal from executing `cmd.exe`.
Author
Owner

@notexactlynikhil commented on GitHub (Nov 7, 2020):

THIS IS NOT CAUSED BY ANTIVIRUS OR ANYTHING. PLEASE READ THIS. Alright so after some research I realised that the problem is with the environment variable. Open Environmental Variables and under System Variables, click on "PATH" and then click new. Now add this - %SystemRoot%system32
Click exit, now restart your System. Everything should be working perfectly fine now. Glad I could help!

@notexactlynikhil commented on GitHub (Nov 7, 2020): THIS IS NOT CAUSED BY ANTIVIRUS OR ANYTHING. PLEASE READ THIS. Alright so after some research I realised that the problem is with the environment variable. Open **Environmental Variables** and under System Variables, click on "PATH" and then click new. **Now add this - %SystemRoot%system32** Click exit, now **restart your System**. Everything should be working perfectly fine now. Glad I could help!
Author
Owner

@ahmedalnuaimi commented on GitHub (Nov 17, 2020):

%SystemRoot%system32

I think that it should be %SystemRoot%\system32.
Didn't work for me

@ahmedalnuaimi commented on GitHub (Nov 17, 2020): > %SystemRoot%system32 I think that it should be %SystemRoot%\system32. Didn't work for me
Author
Owner

@dataspun commented on GitHub (May 13, 2022):

Yes indeed, @mapitman:
The application ~\windowsapps\microsoft.windowsterminal_1.12.10982.0_x64__8wekyb3d8bbwe\windowsterminal.exe invoked the application C:\windows\system32\cmd.exe. The operation was blocked by Carbon Black Cloud

@dataspun commented on GitHub (May 13, 2022): Yes indeed, @mapitman: The application ~\windowsapps\microsoft.windowsterminal_1.12.10982.0_x64__8wekyb3d8bbwe\windowsterminal.exe invoked the application C:\windows\system32\cmd.exe. The operation was blocked by Carbon Black Cloud
Author
Owner

@nasserakhter commented on GitHub (Feb 15, 2023):

Just putting this here from anyone who might be in the same boat as me. If you changed permissions on the C:/Program Files/WindowsApps folder or the %LOCALAPPDATA%/Packages folder, windows terminal will stop working.

@nasserakhter commented on GitHub (Feb 15, 2023): Just putting this here from anyone who might be in the same boat as me. If you changed permissions on the C:/Program Files/WindowsApps folder or the %LOCALAPPDATA%/Packages folder, windows terminal will stop working.
Author
Owner

@zadjii-msft commented on GitHub (Feb 15, 2023):

It sure will!

DO NOT TOUCH C:/Program Files/WindowsApps.

It will mess up your machine.

@zadjii-msft commented on GitHub (Feb 15, 2023): It sure will! # DO NOT TOUCH `C:/Program Files/WindowsApps`. It **will** mess up your machine.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#10022