Computer Hope

Microsoft => Microsoft Windows => Windows XP => Topic started by: drmaze on January 02, 2007, 09:12:16 AM

Title: Command Prompt
Post by: drmaze on January 02, 2007, 09:12:16 AM
I am running Windows 2000 Pro.  When I open the command prompt, none of the DOS commands are recognized as valid.  Not even ipconfig, ping, ect.  I have tried the repair process with the OS cd with no results.  Any help would be greatly  appreciated.


Doug
Title: Re: Command Prompt
Post by: Neil on January 02, 2007, 09:46:50 AM
How are you accessing the command prompt?
Title: Re: Command Prompt
Post by: Fed on January 02, 2007, 11:05:13 AM
Type path and hit <enter>
Make sure your system32 directory is listed.
Quote
Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

C:\>path
PATH=C:\WINNT\[highlight]system32[/highlight];C:\WINNT;C:\WINNT\System32\Wbem
Title: Re: Command Prompt
Post by: WorknEnrgie on January 02, 2007, 01:00:30 PM
I agree, this would seem to me that your command prompt is not starting you in the system directory as you would expect.
Title: Re: Command Prompt
Post by: Neil on January 02, 2007, 02:35:58 PM
ping and ipconfig work in any path for me.
Title: Re: Command Prompt
Post by: Fed on January 02, 2007, 04:46:26 PM
Then your system32 directory must be in your path Neil.
By default windows searches the current directory first then it searches the directories listed in the path to execute the file typed.
Title: Re: Command Prompt
Post by: drmaze on January 02, 2007, 07:45:49 PM
I either type cmd in the start>run box or I have a short cut on my task bar.  The results are the same.  I have found that I can perform some DOS functions like LIST, but no executables will work.  The default path is:
 
C:\Documents and settings\Administrator.Comptername
 
When I type "path" I get- PATH=C:\Program Files\Resource PRO Kit\

I had to re-install the OS some time ago.  This problem has just started within the last few weeks, when I was trying to trouble shoot my router and needed my Default Gateway address and ipconfig did not work.  I was wondering if something in Environmental Variables has gotten mucked up.  Thanks for the help.
 
Title: Re: Command Prompt
Post by: Fed on January 02, 2007, 07:54:41 PM
There's your problem, ping.exe and all the others that don't work for you all hide in your system32 directory.
Easy fix?
Right click on your little cmd button you put in your task bar, choose Properties>Shortcut and tell it to start in C:\Windows\system32
Harder fix?
Include your system32 directory in your path.
Title: Re: Command Prompt
Post by: drmaze on January 02, 2007, 08:02:04 PM
Thanks!  As you were typing back, I went to my Winnt\System32 dir and found the CMD.exe.  All the commands work fine.  How can I get the CMD command to point to the right exe from the Run box?  Would that involve fixing the Environmenal Variables?
Title: Re: Command Prompt
Post by: Fed on January 02, 2007, 08:11:33 PM
You need to have C:\Winnt\System32 in your path.

BTW, where I've said Windows above, replace it with Winnt, I forgot you were on W2K.
(A wise choice)  :)
Title: Re: Command Prompt
Post by: drmaze on January 02, 2007, 08:19:33 PM
Thanks,
All better.  I don't  know how the path got changed to Resouce Pro Kit. :-?  
Title: Re: Command Prompt
Post by: Fed on January 02, 2007, 08:22:36 PM
I think I recall going through this same exercise a few years ago with my own computer.
Happy you are fixed up anyway.