CMD won't run

bigwat

Posts: 38   +0
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.
 
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
 
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.
 
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 https://www.techspot.com/community/...lware-removal-preliminary-instructions.58138/

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.
 
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]
 
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
 
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.
 
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.
 

Attachments

  • cmd properties.bmp
    133.7 KB · Views: 8
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
https://www.techspot.com/community/...lware-removal-preliminary-instructions.58138/
 
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.
 
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.
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)
 
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?
 
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

fullscreencapture118201.jpg
fullscreencapture118201.jpg
 
Back