Why don't my commands work?
When you type the name of an executable program in a command prompt window, cmd.exe processes the command name as follows:
If the command includes a path, cmd.exe checks if the specified executable exists in the specified path. If it does, then cmd.exe executes it; otherwise, it reports an error.
If the command doesn't specify a path, the cmd.exe searches the current directory for an executable matching the command name. If the executable exists in the current directory, cmd.exe runs the executable. If the executable was not found in the current directory, it skips to the next step.
If the executable was not found in the current directory, cmd.exe searches each directory in the Path environment variable, in order, for an executable matching the command name you typed. If the executable exists in any directory specified in the path, cmd.exe executes it; otherwise, it reports an error.
If commands don't work, then, the first thing you should check is the contents of your Path variable. At a bare minimum, your Path should start with the following:
PATH=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\Wbem
Of course,
%SystemRoot% refers to the system installation folder on your system (e.g. "C:\WINNT").
In some cases, the actual contents of the environment variable is correct, but the registry data type is incorrect. The system registry environment variable type should be REG_EXPAND_SZ, not REG_SZ.
I have written a small program called
FIXPATH that attempts to fix these problems. Give it a try and see if it works correctly for you.
To check your registry setting manually, run regedt32 and navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment. Examine the registry data type of the Path entry. If it is not REG_EXPAND_SZ, then you need to perform the following steps:
Open the Path entry so that it is an editable string.
Select the entire string, and press Ctrl+C to copy it to the clipboard.
Cancel editing of the Path entry.
Open notepad and paste the string, to make sure it copied to the clipboard correctly.
Delete the Path entry.
Create a new value called Path and make sure that you select REG_EXPAND_SZ as the data type.
For the contents, press Ctrl+V to paste the contents of the clipboard.
Click OK to save the contents of the registry value.
The cause of this problem is probably an installation program that doesn't correctly read and re-write the registry value with the correct data type.