Share via

Cmd.exe No Longer Opens After Uninstalling Python

Anonymous
2022-09-29T14:05:52+00:00

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?

Windows for home | Windows 10 | Windows update

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.

0 comments No comments

Answer accepted by question author

Ramesh 176.3K Reputation points Volunteer Moderator
2022-09-29T15:08:39+00:00

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!

Was this answer helpful?

5 people found this answer helpful.
0 comments No comments

12 additional answers

Sort by: Most helpful
  1. Don Varnau 19,810 Reputation points Volunteer Moderator
    2022-10-02T12:48:36+00:00

    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

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Ramesh 176.3K Reputation points Volunteer Moderator
    2022-09-29T14:57:03+00:00

    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

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2022-09-29T14:50:13+00:00

    This did launch command prompt correctly. What does /d do? Is there a way I can get it to open normally again?

    Was this answer helpful?

    0 comments No comments
  4. Ramesh 176.3K Reputation points Volunteer Moderator
    2022-09-29T14:42:07+00:00

    Hi ArcKatsu,

    Can you check if running "cmd.exe /d" launches the Command Prompt correctly?

    Was this answer helpful?

    0 comments No comments