Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Command prompt not opening in windows 10

Tags:

cmd

I am trying to open the command prompt but if I open it just opens for a second then gets closed. I also use the command prompt for vscode and I am not able to open the terminal in vscode as well. I tried restarting my computer several times but still, the command prompt doesn't open.

Please suggest a solution from which I can open my command prompt

like image 673
zain Avatar asked Aug 31 '25 04:08

zain


1 Answers

I did have the same problem. The following method worked for me.

Open Powershell (Admin) and enter:

echo off
reg delete "HKCU\Console" /f
reg delete "HKCU\Software\Microsoft\Command Processor" /v "AutoRun" /f
reg delete "HKLM\Software\Microsoft\Command Processor" /v "AutoRun" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File 
Execution Options\cmd.exe" /f
echo done

Found this on a comment from Mr. Holman Calda in this video How to Fix Command Prompt(CMD) Not Working/Opening in Windows 10.

like image 124
Nicolás Muñoz Avatar answered Sep 05 '25 05:09

Nicolás Muñoz