Windows 7 Command p...
 

MegaSack DRAW - This year's winner is user - rgwb
We will be in touch

[Closed] Windows 7 Command prompt

11 Posts
5 Users
0 Reactions
123 Views
Posts: 9
Free Member
Topic starter
 

When I try to run things like ping, tracert and ipconfig from the DOS prompt its coming up as "'ping' is not recognized as an internal or external command, operable program or batch file."
Same applies for other things too. I can get "dir" to bring up a directory listing though.
If I run cmd.exe as an admin it works fine, but not as a local user (I am an admin on the machine).

Any suggestions?


 
Posted : 21/08/2013 5:41 pm
Posts: 36
Free Member
Posts: 0
Free Member
 

Ping and tracert are standard user level commands, so shouldn't need elevated privilages.

First check the commands are actually there (e.g. C:\windows\system32\ping.exe), then check that the paths variables haven't been changed (System - advanced system settings - advanced - enviromental variables), and are pointing to the relavent places where these commands can be found e.g. %SystemRoot%\system32;

edited to add: missed the bit where you said it works in elevated mode... sorry!


 
Posted : 21/08/2013 6:03 pm
Posts: 77691
Free Member
 

check that the paths variables haven't been changed

This.

Note that %systemroot% can get mangled; better to explicitly specify c:\windows\system32 rather than %systemroot%\system32.


 
Posted : 21/08/2013 6:34 pm
Posts: 9
Free Member
Topic starter
 

Just to confirm, I used to be able to use them until recently. Now I can only use them if run as an administrator.


 
Posted : 21/08/2013 8:22 pm
Posts: 77691
Free Member
 

When you say "as an administrator" do you mean running cmd with elevated permissions, or with a different user account?


 
Posted : 21/08/2013 9:09 pm
 dh
Posts: 0
Free Member
 

does sound like path is knack'd.

try this as your user account:

start run>cmd

cd c:\windows\system32
ping xyx.com


 
Posted : 21/08/2013 9:34 pm
Posts: 9
Free Member
Topic starter
 

Cougar, selecting command and right clicking to run as an administrator.
As its fine when run from c:\windows\system32, but fails as unrecognised when run from c:\users\bigyinn
How do I fix the path?


 
Posted : 22/08/2013 8:35 am
Posts: 0
Free Member
 

Open up the system control panel, click on Advanced System Settings, go to the Advanced tab if needed, and click on the Enviromental Variables button.

Scroll down the list of System variables, until you see Path, click on it, then edit.

There'll be a job lot of text, separated by semi-colons.

Here's mine below:

C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;[b]%SystemRoot%\system32[/b];%SystemRoot%;%SystemRoot%\system32\wbem;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static; D:\crysis-2\bin32;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\PHP

You'll want to look for the %SystemRoot% entries, and modify them to C:\Windows\System32 (or whetherever your System 32 dir is) or if they're not present, add them.

Click the image below to make it bigger...

[url= http://i.imgur.com/yjH24lU.jp g" target="_blank">http://i.imgur.com/yjH24lU.jp g"/> [/img][/url]


 
Posted : 22/08/2013 9:10 am
Posts: 9
Free Member
Topic starter
 

Sweet!

That worked a treat, thanks dan!

Any idea why it might have been buggered up in the first place? I have found a couple of trojans on my machine following and overnight scan. Now gone. Will run another av scan tonight to make sure its clean.


 
Posted : 22/08/2013 12:35 pm
Posts: 77691
Free Member
 

's what I said. Mumblegrumblekidsoftoday...


 
Posted : 22/08/2013 3:21 pm
Posts: 9
Free Member
Topic starter
 

Thanks for trying to help me Cougar! I just needed a little more instruction.


 
Posted : 22/08/2013 3:47 pm