Forum Discussion
Can not run commands within command line, PowerShell or other terminals
- Jan 08, 2024
Harm_Veenstra I've Solved it, as it was missing the following Paths in "Paths" In system variables:
%SystemRoot%\system32 %SystemRoot% %SystemRoot%\System32\Wbem %SYSTEMROOT%\System32\WindowsPowerShell\v1.0\ %SYSTEMROOT%\System32\OpenSSH\It did not contain the paths, so they could not execute the commands, thank you for suggesting that the issue could have arisen from environment variables
Correct:
Correct "path"Incorrect:
Incorrect "path"
Harm_Veenstra, I can run certain commands such as "cd", "dir", and "get-childitem c:\", however, most of the useful commands, such as ipconfig are nonfunctional and return a similar error when executed, I do get around this this however by creating a .bat file that changes the dir to C:\Windows\System32 where the commands are stored.
One of the possible causes is that there is an issue with system variables, as in the past, I could not run the "jar", but the solution for me was that the PATH was not properly defined but I highly doubt that this could be the root of the issue.
- Jan 04, 2024
Any update?
- Theo_suarezJan 08, 2024Copper Contributor
Harm_Veenstra I've Solved it, as it was missing the following Paths in "Paths" In system variables:
%SystemRoot%\system32 %SystemRoot% %SystemRoot%\System32\Wbem %SYSTEMROOT%\System32\WindowsPowerShell\v1.0\ %SYSTEMROOT%\System32\OpenSSH\It did not contain the paths, so they could not execute the commands, thank you for suggesting that the issue could have arisen from environment variables
Correct:
Correct "path"Incorrect:
Incorrect "path"- xu7Jan 09, 2024Copper Contributor
Uninstall reinstall then sfc /scannow then takeown /f * netuser (setup) then chkdsk if still no then try roll back of update and or feature Theo_suarez
- Theo_suarezJan 05, 2024Copper Contributor
Haven't got around to doing it.
- Jan 01, 2024If creating a bat file that changes your directory to system32, I think you might check the system path settings on your system. Compare it to another system or from Windows Sandbox if you use it