Two things I might try.
- Run an
sfc /scannowto see if that fixes any larger issues at play. - Check the registry for the
Pathkey inHKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment. What's thetype. It should sayREG_EXPAND_SZ
本文解决了一个特定的问题,在Windows系统中,当非管理员用户使用CMD时,发现某些系统目录下的命令无法正常执行。经过排查,发现原因是CMD中的Path环境变量未正确展开。文章提供了两种解决方案:一是运行sfc /scannow命令来检查并修复可能存在的系统文件问题;二是检查注册表中Path键的类型是否为REG_EXPAND_SZ。
问题现象:Windows、System32等系统目录里命令,无法通过Path搜索路径来执行。查看Path环境变量结果如下:
D:\>echo %Path%
%SystemRoot%;%SystemRoot%\System32;......
解决办法:
Two things I might try.
sfc /scannow to see if that fixes any larger issues at play.Path key in HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment. What's thetype. It should say
REG_EXPAND_SZ
572
3万+

被折叠的 条评论
为什么被折叠?