TechSpot

CMD won't run

By bigwat
Oct 13, 2010
Post New Reply
  1. hi there, i tried an instruction from a web page but messed up something, i opened notepad, and typed '{cmd}' (without quotes), and stored it as .bat. i tried to run it but got message 'windows cannot find 'cmd'.make sure you type......., Now cmd won't run please help me.
     
  2. Tmagic650

    Tmagic650 TS Ambassador Posts: 17,244   +234

    What version of Windows are you running?
     
  3. bigwat

    bigwat TS Enthusiast Topic Starter Posts: 38

    xp

    hi i'm running windows xp wsp3.
     
  4. Tmagic650

    Tmagic650 TS Ambassador Posts: 17,244   +234

    CMD should open the command prompt window in XP, when you type it into the RUN window. Are you saying this action won't work at all? Try a system restore back to a time before you messed things up
     
  5. bigwat

    bigwat TS Enthusiast Topic Starter Posts: 38

    what tha......!!

    the restore points that i made disappeared i'm so fed up!!!
     
  6. LookinAround

    LookinAround Ex Tech Spotter Posts: 6,491   +183

    Click Start->Run, enter cmd, click OK

    Do you get a command prompt window this way?
     
  7. bigwat

    bigwat TS Enthusiast Topic Starter Posts: 38

    I Tried

    I Tried that firstly, but it won't work, the first time i got back my pc i made restore pionts and now the only ones i have are when the automatic software updates were installed. I f you can plz help me.
    Thanks.
     
  8. gbhall

    gbhall TechSpot Chancellor Posts: 2,425   +77

    Click 'start' then 'search' and search for cmd.exe. It lives in c:\windows\system32 For XP SP3 the properties should be 14April2008 12:00 size 389,120 bytes, version 5.1.2600.5512. Anything different is a bad 'un.

    If it is not there, copy it there if it has gone somewhere else, or from a friends PC. If it is there but does nothing when double-clicked you possibly have an infection and should start the process here http://www.techspot.com/vb/topic58138.html

    If it is there, and works when double-clicked, I will be amazed, it would mean your search paths are wrong, so come back and we will put them right.

    Something in what you say tells me you are not admitting to half the full story. Don't be ashamed, we all pick up serious infections sometimes. When we do, we can usually (but not always) fix it. If you have little idea what you are doing however, that's a different story, and the answer would be find a knowledgeable friend, or re-install Windows which will destroy everything on the hard drive.
     
  9. jobeard

    jobeard TS Ambassador Posts: 9,311   +617

    CMD is located in \Windows\System32\cmd.exe

    to allow Start->Run->CMD to run, you need
    your PATH variable to contain
    \Windows\System32​
    using an ADMIN login
    • right-click My Computer->Properties
    • Click the Advanced Tab
    • Click the Environment Variables button near the bottom
    • In the lower half (System Variables), scroll to Path
    • Each directory starts with C:\ and ends with ;
      If you don't see \Windows\System32, then add C:\Windows\System32; to the beginnning of the Path

    [edit]you need to reboot to make this effective[/edit]
     
  10. LookinAround

    LookinAround Ex Tech Spotter Posts: 6,491   +183

    If the above doesn't work consider, try a non-destructive XP repair install. (you'll need your XP install disks)

    p.s. even tho repair installs shouldn't touch any personal data (only Windows files and settings) is still prudent to run a backup before hand. never hurts!
     
  11. jamesodriscoll

    jamesodriscoll TS Rookie Posts: 91

    Hi,

    Your restore points have gone??? I would recomment taking a visit to the Malware section on the TS forums jsut incase you have picked up an infection,


    CMD as stated buy the guys should open when you open RUN and type in cmd.

    Why did you need the batch file anyway?
    Is there a specific reason you need the Cmd for anything?


    James
     
  12. bigwat

    bigwat TS Enthusiast Topic Starter Posts: 38

    ok i saw all you wrote about the Path variables but does this have anything to do with cmd not runnig? Becuase
    it's there.
     
  13. bigwat

    bigwat TS Enthusiast Topic Starter Posts: 38

    well the story is that my friend and i was in a session and had learned some new programing trick and i decided to try the above coding. But the attachment should show you the propertie of the cmd. i dont really understand if it's good or bad.
     

    Attached Files:

  14. jamesodriscoll

    jamesodriscoll TS Rookie Posts: 91

    the Path vairables is to make sure that the cmd is in the right locaiton. It should be in the system32 foldder in windwos as specified

    \Windows\System32\cmd.exe

    It sounds like something is stopping you from accessing certain parts of the PC. Are you sure you have the correct admin rights?

    If you want to do a system restore you can select one of the Windows Updates before you made the Batch file. this wont effect your personal files etc.

    As i said before might be an idea to check for malware to jus tin case
    http://www.techspot.com/vb/topic58138.html
     
  15. jamesodriscoll

    jamesodriscoll TS Rookie Posts: 91

    according to the image i have just seen your if THATS the location of your cmd then its in the wrong place.

    It also has the incorrect file date properties ect. It should be dated in 2008.

    Try the system restore to a point BEFORE October 13th.
     
  16. LookinAround

    LookinAround Ex Tech Spotter Posts: 6,491   +183

    @as fyi for others reading
    I want to "close the loop" between bigwat's two threads now that I realized bigwat's' also the one who asked about tweaking their computer in this thread here :)

    @bigwat
    Also, to avoid duplicate effort and confusion between info and help in the two threads suggest you only reply to this thread
     
  17. jobeard

    jobeard TS Ambassador Posts: 9,311   +617

    dead give-away is the TEMPHACK folder name.

    suggest the original poster use
    Start->Programs->Accessories->System Tools->Disk Cleanup to delete obvious junk
    (ie other stuff, as the temphack will not be cleard; do that manually)
     
  18. bigwat

    bigwat TS Enthusiast Topic Starter Posts: 38

    Ok what do i need to remove and why TEMPHACK folder
     
  19. jobeard

    jobeard TS Ambassador Posts: 9,311   +617

    I'm sure LookinAround will give you a detailed reply ...
     
  20. bigwat

    bigwat TS Enthusiast Topic Starter Posts: 38

    ok small quote when i open the cmd from search folder it runs fine then i try to start>run>cmd and it dosent open does this have anything to do with helping?
     
  21. LookinAround

    LookinAround Ex Tech Spotter Posts: 6,491   +183

    1. Is Temphack a folder YOU created while trying stuff out on on your computer?
    2. As jamesodriscoll noted above, Windows\System32\temphack is NOT the correct location for cmd.exe
    3. If you search for cmd.exe, you should only have ONE copy of cmd.exe on your computer and it should be in C:\Windows\System32.

    Note the properties and File Version for cmd.exe as found on my XP SP3

    [​IMG] [​IMG]
     

Similar Topics

Add New Comment

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...