1

When I open Start > Run, type cmd.exe and press Enter, a black window shows up and disappears immediately.

  • I've tried opening it from C:\windows\System32\cmd.exe
  • I've tried cleaning the PATH environment variable

However none of these have made any difference. Does anyone have an idea what the problem could be?

4 Answers 4

6

I had this problem and solved it in the following way:

Go to the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor

It has an AutoRun value set to (Exit). Delete this value and the Command Prompt should work again.

1

I faced this issue once, and this probably looks like a virus/worm issue. Check if your Task Manager & Registry Editor is disabled?

9
  • Do you mean to check if I can open the Task manager and the Registry editor ? if so, I can open them and they work fine.
    – Nour
    Jun 14, 2011 at 7:33
  • @Nour: Can you try to get a screenshot of Command Prompt just before exiting? Also, which Windows you are running? Also, Can you try running from different user account, maybe Administrator?
    – anilmwr
    Jun 14, 2011 at 9:30
  • I'm running windows 7 with administrator user and I tried to run as administrator , I also tried to get a screen shot and there is no error message, just the normal message of the command prompt. (Microsoft Windows Version 6.1.7600) Copyright (C) .....
    – Nour
    Jun 14, 2011 at 14:21
  • @Nour: If your system is really infected, then I don't think that just renaming cmd.exe will work. I had issues with Sysinternal's Process Explorer, the malware used to kill it even when I renamed the EXE. Looked like it was checking the Application Title. Also, If you're getting Command Prompt Version & Copyright in the screenshot, then there must be some other problem.
    – anilmwr
    Jun 15, 2011 at 7:04
  • @anilmwr could you advise me with some anti-mall-ware programs ?
    – Nour
    Jun 15, 2011 at 7:21
0

Go to windows directory (c:\windows\system32), find cmd.exe and copy it somewhere (like c:\ or desktop), then rename it to for example cmd2.exe and run it. If it works then you are infected with some kind of malware.

3
  • actually it didn't run, and I managed to read the following message: the system cannot find the text for message number .... in the message file.
    – Nour
    Jun 14, 2011 at 14:20
  • Then don't move the vopy, just create a copy of it with a different name. It is looking for some file in c:\windows\system32 and cannot find it (message texts are inside that file probably)
    – Xaqron
    Jun 14, 2011 at 20:58
  • I tried that too, but it didn't work .
    – Nour
    Jun 15, 2011 at 7:20
-1

Try one best solution Copy CMD.exe from some other computer and paste it in your computer.

1
  • :) thanks for answer, but I think I already solved the problem.
    – Nour
    Jun 19, 2012 at 16:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .