1.

Solve : Cannot use External DOS commands?

Answer»

When I RUN a cmd session from Windows the only DOS commands I can run are Internal like DIR, DEL, CD. But DOS will not recognise any External DOS commands like XCOPY, NETSTAT, HELP, FIND etc.
I get error message: "'command' is not recognosed as an internal or external command, operable program or batch program."
I checked system32 directory and these files do exist. I checked my path and system32 is part of my path.
I never had a problem with this before with this PC, problem started recently. What could be wrong?
Running Windows XP PRO SP2.
Welcome to the CH forums.

I can only suggest that your start cmd.exe then cd to windows\System32 and try running a few externals from there. If that works then recheck your path to confirm that %systemroot%\System32 is correctly displayed.

Good luck

When I CD to windows\System32 the External commands work!
This is my Path:

PATH=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\WBEM;C:\Program Files\Executive Software\Diskeeper\;C:\Program Files\Support Tools\;C:\WINDOWS\System32\Wbem

I checked %SystemRoot% and it is correctly set as C:\Windows

I just now changed Path by entering "path %path%;C:\Windows\System32" and the external commands work from any directory. So, why wasn't the original path good enough? And will path revert back after reboot, or what is a permanent fix? I think the problem is that the Path command is a little too literal, it is trying to find a directory called %systemroot% - it isnt expanding the environment variable.

Change it to be the actual directories and I think it will work

GrahamOkay, so how do I edit the Path list so it will be permanent after reboot? Do I use the old fashion way with Autoexec.bat?
Thanks for your continued support.To edit Path: (XP)

Right click My Computer then click Properties -or- press the Windows key+Break to bring up the System Properties window.

Click Advanced>Environment Variables>Path (In System Variables pane)>Edit

Change the entries to what you want then click OK in the Edit pane then Ok in the Environment Variables window and exit the System Properties windows.

Good luck

This can also be done by creating a desktop shortcut to .cmd and right CLICKING the shortcut...From Explorer navigate to system32...right clik cmd. and create shortcut.
Drag the shortcut to the desktop.
Now when you right clik the shortcut and select Properties you will see all the option you can change for the Command Prompt loading including Target etc.Sorry, I deleted my last RESPONSE in error. It questioned how to set the Environment Variables using Quote

This can also be done by creating a desktop shortcut to .cmd and right clicking the shortcut.

I'm up to speed on this feature but find that altering the Shortcut Properties does not edit the Environment Variables in any way. Also found that in order to access the External Commands using a shortcut, the Start In has to be C:\Windows\System32\


Discussion

No Comment Found