Commands not working in Windows 7 32-bit command prompt

32-bitcommand linewindows 7

I have an HP laptop with a Windows 7 32-bit Home Premium operating system. My command prompt doesn't run lots of commands like help, shutdown, ipconfig, ping, etc. I get a message like:

 'help' is not recognized as an internal or external command, operable program or batch file.

Only simple commands like cd and dir are working. I noticed that whenever I navigate to c:/windows/system32, the command works. But I need to run some important commands like java on a file that is on the desktop and not in the system32 folder.

How can I fix this?

Best Answer

You say that when you type set path in a command prompt the path also contains PATH=%systemroot%\system32. If this is the case your %systemroot% does not get expanded to C:\Windows (or other real Windows-directory) when starting cmd.exe.

You can check your registry in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment. All the names containing values with % characters (e.g. windir, temp, path and comspec) should be of type REG_EXPAND_SZ (and not REG_SZ) or the variable won't be expanded.

You should also check HKEY_CURRENT_USER\Environment if path is of type REG_EXPAND_SZ.

Related Question