Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Cmd immediately closing  (Read 6513 times)

0 Members and 1 Guest are viewing this topic.

Xeratul

    Topic Starter
  • 100,000th poster


  • Hopeful
  • Experience: Familiar
  • OS: Windows 7
Cmd immediately closing
« on: February 21, 2006, 06:27:02 PM »
I can get around this, but I'm just a little curious...

When I go to "Start - Run" and type cmd the window opens, but immediately closes. Huh, that doesn't normally happen. I want to know why it's doing it. When I go to "Start - Run" and type "cmd.exe" specifying it with the .exe application extension it opens and works fine. "Command" and "Command.com" also work fine.

I thought the window closing immediately was similar to MS-DOS applications running and then closing because they have nothing to do. For example I went to "Start - Run" and typed "netstat".

Another cmd file in my C:\WINDOWS\System32\ directory is "cmd_original.exe" this may have always been there, but I've never noticed it before.

EDIT 1: I just noticed another odd thing...
When I go to "Start - Run" and type something like

Code: [Select]
C:\>tracert computerhope.com > C:\tracert.txt
It doesn't even execute the command; it just immediately closes.

EDIT 2: Just found that some of my external commands like tracert, ping, and netstat won't work, even when I enter them any of the command prompts (cmd, command)

EDIT 3: I rebooted my computer, but it didn't help anything...
« Last Edit: February 22, 2006, 08:07:34 AM by Wraith112 »

Dusty



    Egghead

  • I could if she would, but she won't so I don't.
  • Thanked: 75
  • Experience: Beginner
  • OS: Windows XP
Re: Cmd immediately closing
« Reply #1 on: February 21, 2006, 07:21:54 PM »
Virus scan, AdAware, Spybot etc etc :-?
One good deed is worth more than a year of good intentions.

Xeratul

    Topic Starter
  • 100,000th poster


  • Hopeful
  • Experience: Familiar
  • OS: Windows 7
Re: Cmd immediately closing
« Reply #2 on: February 21, 2006, 10:40:44 PM »
Did all of the above, and found a trojan. Deleted it and rebooted, but the problem persists.

Dusty



    Egghead

  • I could if she would, but she won't so I don't.
  • Thanked: 75
  • Experience: Beginner
  • OS: Windows XP
Re: Cmd immediately closing
« Reply #3 on: February 21, 2006, 11:42:49 PM »
At the command prompt enter SFC /SCANNOW to scan/replace corrupt system files.  Have your XP cd ready.
One good deed is worth more than a year of good intentions.

vibhor_agarwalin



    Adviser

    Re: Cmd immediately closing
    « Reply #4 on: February 21, 2006, 11:52:17 PM »
    Doesn't your system has a file named cmd.
    Have you searched your whole system?

    The other commands which are not working -> do they give any error?
    Vibhor Kumar Agarwal

    GuruGary



      Adviser
      Re: Cmd immediately closing
      « Reply #5 on: February 22, 2006, 01:01:42 AM »
      You probably have some sort of batch file or DOS executable file called "cmd".  From an open command prompt, type "cmd" and see what happens.  Or search your HD for other files named "cmd".

      carlos

      • Guest
      Re: Cmd immediately closing
      « Reply #6 on: February 22, 2006, 04:14:59 AM »
      Quote
      EDIT 2: Now it's getting worse... Seems like some of my external commands like tracert, ping, and netstat won't work even when I enter them any of the command prompts.

      Modify your environment variable PATH, surely it haven't the directory C:\WINDOWS\System32\

      Xeratul

        Topic Starter
      • 100,000th poster


      • Hopeful
      • Experience: Familiar
      • OS: Windows 7
      Re: Cmd immediately closing
      « Reply #7 on: February 22, 2006, 08:04:01 AM »
      Quote
      At the command prompt enter SFC /SCANNOW to scan/replace corrupt system files.  Have your XP cd ready.
      I did that, but it just closed after if finished and didn't ask me for my CD.

      I did a search of "cmd" in my C:\WINDOWS\ directory, here are the results...



      Isn't there supposed to be a "cmd" in the System32 directory?

      « Last Edit: February 22, 2006, 10:00:12 PM by Wraith112 »

      Fed

      • Moderator


      • Sage
      • Thanked: 35
        • Experience: Experienced
        • OS: Windows XP
        Re: Cmd immediately closing
        « Reply #8 on: February 22, 2006, 01:26:51 PM »
        cmd.exe is in the system32 directory.
        I bet you also have cmd.com on your computer which shouldn't be there.
        Windows executes .com files before .exe files... does that tell you something?
        Scan your computer.

        Xeratul

          Topic Starter
        • 100,000th poster


        • Hopeful
        • Experience: Familiar
        • OS: Windows 7
        Re: Cmd immediately closing
        « Reply #9 on: February 22, 2006, 04:56:44 PM »
        Quote
        cmd.exe is in the system32 directory.
        I bet you also have cmd.com on your computer which shouldn't be there.
        Windows executes .com files before .exe files... does that tell you something?
        Scan your computer.

        I think your right about the .com executing before the .exe...
        I went to "Start - Run" and typed "cmd.com" and the windows closes immediately after. Similar to if I just went to "Start - Run" and typed "cmd".

        However I'm having trouble deleting this "cmd.com" file. I navigate to my C:\WINDOWS\System32 directory and search for a cmd.com. I can't find it (I have hidden file viewing on) could it be hidden with a registry script?

        I wen't to command.com the command prompt that sort of works. Navigated to the C:\WINDOWS\System32 folder and type "del cmd.com" what it returns with "Could not find C:\WINDOWS\System32\cmd.com".

        I've ran Adaware, Norton, and AVG. All of them discovered a few things, all of which I promptly deleted. The problem still obnoxiously persists.

        I really want to fix this.  :-/

        EDIT 1: It appears that the few external command I listed that wern't working appear to have a .com file hidden with them too.
        « Last Edit: February 22, 2006, 10:02:24 PM by Wraith112 »

        Fed

        • Moderator


        • Sage
        • Thanked: 35
          • Experience: Experienced
          • OS: Windows XP
          Re: Cmd immediately closing
          « Reply #10 on: February 22, 2006, 11:29:27 PM »
          Google "cmd.com" with the quotes"".
          Perhaps you should question how good your scanners are of if they are uptodate etc.
          cmd.com is far from being something new or exotic.
          « Last Edit: February 22, 2006, 11:30:07 PM by Fed »

          Xeratul

            Topic Starter
          • 100,000th poster


          • Hopeful
          • Experience: Familiar
          • OS: Windows 7
          Re: Cmd immediately closing
          « Reply #11 on: February 24, 2006, 05:21:55 PM »
          After doing a little bit of research I'm sure this Alcan worm is my problem.
          I read this http://securityresponse.symantec.com/avcenter/venc/data/w32.alcra.f.html, and after doing some scans my anti virus software was picking it up.

          My current problem is that my anti-virus software is failing to remove it...
          It says it have been deleted, but I scan the next day and its still there.

          I'm sure I got this virus through limewire probably why it have been acting up lately too. http://www.computerhope.com/cgi-bin/yabb/YaBB.cgi?num=1140579109/0
          Any assistance is appreciated, thanks.  :)

          EDIT 1: At present time I'm trying to remove them manually.
          « Last Edit: February 24, 2006, 05:28:15 PM by Wraith112 »

          2k_dummy



            Specialist
          • A word, once spoken, can never be recalled.
          • Thanked: 14
            Re: Cmd immediately closing
            « Reply #12 on: February 24, 2006, 05:30:24 PM »
            Look at the location of the virus. If it is in a restore file, AV cannot remove it. Turn off system restore and rescan from safe mode. When it comes up clean, you can reenable system restore.
            If you don't stand for something, you'll fall for anything.
            _______________________________________ ________
            BlackViper

            Software and utilities

            Xeratul

              Topic Starter
            • 100,000th poster


            • Hopeful
            • Experience: Familiar
            • OS: Windows 7
            Re: Cmd immediately closing
            « Reply #13 on: February 24, 2006, 08:20:28 PM »
            I believe the virus has been removed...  :)
            I think you were right about not being able to remove it because of the system restore. I turned it off, and cmd is functioning normally.

            Although the limewire problem remains (can't seem to shut it down).  :-/
            « Last Edit: February 24, 2006, 09:18:28 PM by Wraith112 »

            GX1_Man

            • Guest
            Re: Cmd immediately closing
            « Reply #14 on: February 24, 2006, 08:58:05 PM »
            P2P is a portal for all kinds of crappola. It is a good way to test your virus protection. ;)

            Xeratul

              Topic Starter
            • 100,000th poster


            • Hopeful
            • Experience: Familiar
            • OS: Windows 7
            Re: Cmd immediately closing
            « Reply #15 on: February 24, 2006, 09:09:26 PM »
            I never use it, and don't really wan't it but my brother got mad and told me to reinstall so he could download his "beverly hills cop theme".   ;)