Hi,
The Autorun value is not present in the 2nd key. It's normal.
Now, to fix the Command Prompt, run this command:
reg delete "HKCU\SOFTWARE\Microsoft\Command Processor" /v "Autorun" /f
That should do the trick!
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Last night, I uninstalled Python 3.10.6 (which I got from python.org, the official site), but noticed immediately after that cmd.exe no longer opens, or may flash open and immediately close. I tried entering safe mode to open it, but that still didn't work. I believed it might have corrupted some system files, so I reinstalled Windows 10 following this article, but unfortunately that did not fix the issue either. What might be going wrong, and how could I fix it?
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
Hi,
The Autorun value is not present in the 2nd key. It's normal.
Now, to fix the Command Prompt, run this command:
reg delete "HKCU\SOFTWARE\Microsoft\Command Processor" /v "Autorun" /f
That should do the trick!
This worked! Thank you for the help.
Sorry that it's 3 days later, but...
ArcKatsu,
Please mark the post by Ramesh Srinivasan as the Answer. A moderator could mark it but it's preferred, for statistical purposes, that you mark it.
Thanks,
Don
From CMD.exe help:
/D Disable execution of AutoRun commands from registry (see below)
If /D was NOT specified on the command line, then when CMD.EXE starts, it
looks for the following REG_SZ/REG_EXPAND_SZ registry variables, and if
either or both are present, they are executed first.
HKEY\_LOCAL\_MACHINE\Software\Microsoft\Command Processor\AutoRun
and/or
HKEY\_CURRENT\_USER\Software\Microsoft\Command Processor\AutoRun
Now, to find what's being executed via the Autorun key, run these commands and post the output here:
From a Command Prompt window, run:
reg query "HKCU\SOFTWARE\Microsoft\Command Processor" /v Autorun
and then, type:
reg query "HKLM\SOFTWARE\Microsoft\Command Processor" /v Autorun
This did launch command prompt correctly. What does /d do? Is there a way I can get it to open normally again?
Hi ArcKatsu,
Can you check if running "cmd.exe /d" launches the Command Prompt correctly?