Windows system environment variables are not expanded problem

Windows system environment variables are not expanded problem

 

Symptoms: Windows, System32 directory and other system commands can not be executed by Path search path. View Path environment variable as follows:

D:\>echo %Path%
%SystemRoot%;%SystemRoot%\System32;......

 

Problem Cause: cmd.exe, the environment variable path contains no expansion.

 

Solution:

Type of the variable may be a problem.

REG_SZ string type

REG_EXPAND_SZ string type to be extended

 

Two things I might try.

  1. Run an sfc /scannow to see if that fixes any larger issues at play.
  2. Check the registry for the Path key in HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment. What's thetype. It should say REG_EXPAND_SZ

 

============ End

 

Guess you like

Origin www.cnblogs.com/lsgxeva/p/11592157.html