SOLVED

cmd.exe will not run

%3CLINGO-SUB%20id%3D%22lingo-sub-2888758%22%20slang%3D%22en-US%22%3Ecmd.exe%20will%20not%20run%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2888758%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20been%20having%20some%20issues%20with%20windows%2011's%20terminal%20apps.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20executed%2C%20cmd.exe%20will%20exit%20immediately%20which%20exit%20code.%20Powershell%20and%20wsl%20all%20work%20fine.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPS%20C%3A%5CUsers%5Cuser%26gt%3B%20cmd%3CBR%20%2F%3EMicrosoft%20Windows%20%5BVersion%2010.0.22000.282%5D%3CBR%20%2F%3E(c)%20Microsoft%20Corporation.%20All%20rights%20reserved.%3CBR%20%2F%3EPS%20C%3A%5CUsers%5Cuser%26gt%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWindows%20Terminal%20somehow%20got%20into%20my%20Win%2BX%20menu%2C%20even%20after%20I%20uninstall%20Windows%20terminal.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20additional%2C%20Windows%20terminal%20does%20not%20show%20as%20an%20option%20in%20default%20terminal%20app%20in%20the%20terminal%20settings.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2888758%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFeatures%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2889089%22%20slang%3D%22en-US%22%3ERe%3A%20cmd.exe%20will%20not%20run%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2889089%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1197051%22%20target%3D%22_blank%22%3E%40cwang36%3C%2FA%3E%2C%26nbsp%3B%3C%2FP%3E%3CP%3EWindows%2011%20comes%20with%20Windows%20Terminal%20as%20the%20default%20command-line%20tool.%20However%2C%20you%20can%20still%20use%20the%20cmd%20as%20a%20command-line%20tool%20by%20the%20following%20below%20steps.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22cmd.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F320329iD7A16578477A8E73%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22cmd.png%22%20alt%3D%22cmd.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2909065%22%20slang%3D%22en-US%22%3ERe%3A%20cmd.exe%20will%20not%20run%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2909065%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20for%20the%20reply%2C%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F740862%22%20target%3D%22_blank%22%3E%40SalmanAhmed%3C%2FA%3E%26nbsp%3B%2C%20didn't%20know%20that%20Windows%20Terminal%20now%20comes%20preinstalled%20with%20the%20system.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20issue%20with%20cmd.exe%20exiting%20with%20code%201%20is%20eventually%20fixed%20after%20a%20clean%20install%20of%20windows%2011.%20I%20was%20originally%20upgraded%20from%20windows%2010.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I have been having some issues with windows 11's terminal apps.

 

When executed, cmd.exe will exit immediately which exit code. Powershell and wsl all work fine.

 

PS C:\Users\user> cmd
Microsoft Windows [Version 10.0.22000.282]
(c) Microsoft Corporation. All rights reserved.
PS C:\Users\user>

 

Windows Terminal somehow got into my Win+X menu, even after I uninstall Windows terminal. 

 

In additional, Windows terminal does not show as an option in default terminal app in the terminal settings.

 

3 Replies
best response confirmed by cwang36 (New Contributor)
Solution

Hi @cwang36

Windows 11 comes with Windows Terminal as the default command-line tool. However, you can still use the cmd as a command-line tool by the following below steps.

cmd.png

Thanks for the reply, @SalmanAhmed , didn't know that Windows Terminal now comes preinstalled with the system.

 

The issue with cmd.exe exiting with code 1 is eventually fixed after a clean install of windows 11. I was originally upgraded from windows 10.

Thanks for your feedback!
It is extremely important to have such a comprehensive tool that supports a number of commands from Linux, PowerShell, SSH, and Cloud Shell. It is a big shift to move from a traditional console to Windows Terminal that will support the commands and run applications from a different platform.