CMD.exe closes immediately after calling (Win7 64)

前端 未结 6 772
说谎
说谎 2021-02-05 07:54

Has anyone found such behavior when Command Processor (cmd.exe) closes immediately after calling it? I’ve run McAfee AV and Windows System File Check (sfc.exe) and nothing wron

6条回答
  •  粉色の甜心
    2021-02-05 08:34

    Answering all questions:

    • superuser, safe mode, run as admin, changing ownership and permissions - didn't help
    • I was calling by menu start as well as d-clicking cmd.exe with same result,
    • No virsus either malware found by today's scanning with McAfee, Anti-malware, MS Malicious removal... etc

    Finally I got it SOLVED:

    • Run regedit
    • Go to HKLM\Software\Microsoft\Command Processor\ or HKEY_CURRENT_USER\Software\Microsoft\Command Processor\ or HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\

    • For some reason there was AUTORUN key with "EXIT" inside.

    • Remove the AutoRun key and everything should went back to normal.
    • CMD.exe should start to work again.

    Also,

    In some cases, the Command prompt is also opening on Startup, which is when the above solution is applied hangs the system on Command prompt when you logon.

    This can be fixed by using Autoruns, where you need to disable command prompt startup registries on Logon/Startup tab. (there can be more than one entries)

    That one also explains why exit code was 0x0.

    Have no idea what kind of thing set that key up... McAfee showed some activity lat week and I've noticed it last Friday.

    Hope these symptoms and my answer will help someone in future

提交回复
热议问题