CMD.exe closes immediately after calling (Win7 64)

前端 未结 6 771
说谎
说谎 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:15

    I had this problem and found something to try that solved my problem.

    Investigate registry entry HKLM\Software\Microsoft\Command Processor If there is an "Autorun" key, this key causes the batch file entry in this key to run at the beginning of the command prompt execution. You can try to skip this execution to test the solution using RUN cmd.exe /d

    If the problem is user specific, check HKCU\Software\Microsoft\Command Prompt for this key. The current user entry mixes in with the local machine entry so if the key exists in the current user registry then it will try to execute the listed batch file. On my computer the key was there but empty. If there is a batch file in this key then figure out what that batch file is doing and if you want it there. I deleted the key all together and the problem went away.
    On my computer the key was present in current user but not in local machine.

    Somehow some virus probably put this key in the registyr but since it is a valid key, it is hard for malware detectors to find this.

    I didn't find any other solutiosn to this problem on the web so please let others know if this works for you. I never post on forums but saw a bunch of questions about this and on good solutions so I thought I had to post.

    I got the idea about this solution from this link.
    http://software.oberberger.com/2008/09/interesting-stuff-about-cmdexe.html

    Good luck.

提交回复
热议问题