Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows 如何使用户路径的解析优先于系统路径?_Windows_Path Variables - Fatal编程技术网

Windows 如何使用户路径的解析优先于系统路径?

Windows 如何使用户路径的解析优先于系统路径?,windows,path-variables,Windows,Path Variables,在windows系统中,变量环境中不同路径的顺序定义了解析优先级: 例如: 如果路径由以下内容构成:C:/Dir1;C/Dir2 并且包含C:/Dir1/test.exe和C:/Dir2/test.exe 在cmd中运行test.exe将解析为C:/Dir1/test.exe 这很好,但是在Windows中有两条路径,用户路径和系统路径。并且有如下连接: 因此,系统路径似乎总是优先于用户路径 我错了吗 关于,你到底想做什么?我只想修改用户路径(因此没有管理员权限)(比如添加C:/Dir2),

在windows系统中,变量环境中不同路径的顺序定义了解析优先级:

例如:

  • 如果路径由以下内容构成:
    C:/Dir1;C/Dir2
  • 并且包含
    C:/Dir1/test.exe
    C:/Dir2/test.exe
  • 在cmd中运行
    test.exe
    将解析为
    C:/Dir1/test.exe
这很好,但是在Windows中有两条路径,用户路径和系统路径。并且有如下连接:

因此,系统路径似乎总是优先于用户路径

我错了吗


关于,

你到底想做什么?我只想修改用户路径(因此没有管理员权限)(比如添加
C:/Dir2
),但是如果系统路径包含一个已经解析
test.exe
(比如
C:/Dir1
)的路径,那么
C:/Dir2
将无法解析
test.exe
。(假设
test.exe
同时位于
C:/Dir1
C:/Dir2