[英]Windows show local path as list in the Environmental Variables pane
I like to modify my Windows environmental variables by opening the Advanced System Settings -> Environmental Variables
.我喜欢通过打开
Advanced System Settings -> Environmental Variables
来修改我的 Windows 环境Advanced System Settings -> Environmental Variables
。 I particularly like that when I try to modify the system path (by clicking on System Variables -> Path
), that I get a nice, easy to read list of the folders on the path:我特别喜欢当我尝试修改系统路径(通过单击
System Variables -> Path
)时,我会得到一个不错的、易于阅读的路径上的文件夹列表:
However, when I click on the User Variables -> Path
, I still get the old dialog, which is not very user friendly:但是,当我单击
User Variables -> Path
,我仍然看到旧对话框,这对用户不是很友好:
Is it possible to have Windows always display the list, as is the case for the System variables?是否可以让 Windows 始终显示列表,就像系统变量的情况一样?
For what its worth, I think I remember seeing the desired behavior on a friend's computer, so I believe it should be possible.不管它的价值是什么,我想我记得在朋友的电脑上看到过想要的行为,所以我相信这应该是可能的。
EDIT:编辑:
It seems that having a variable as part of the path is the problem.似乎将变量作为路径的一部分是问题所在。 Is there a way to get path list even when the path contains variables?
即使路径包含变量,有没有办法获取路径列表?
Context: When I want to add a program to my path, I will create a new variable that redirects to its path.上下文:当我想将程序添加到我的路径时,我将创建一个重定向到其路径的新变量。 The reason to do that is simple... Programs typically have compound paths, and so making a consolidated variable seems like a wise decision.
这样做的原因很简单……程序通常具有复合路径,因此创建一个合并的变量似乎是一个明智的决定。 For instance, on my machine, I have multiple python instances (sometimes I need an Anaconda installation of Python 3.6, and sometimes I want a version of the bare-bones Python 3.5).
例如,在我的机器上,我有多个 Python 实例(有时我需要 Python 3.6 的 Anaconda 安装,有时我想要一个 Python 3.5 的准系统版本)。 To accomodate this, I create environmental variables for the paths to each installation.
为了适应这一点,我为每个安装的路径创建了环境变量。
Now if I want to switch which version is on my path, I can simply update my path variable from现在,如果我想切换路径上的版本,我可以简单地从
path=...;%PATH_PYTHON35%
to到
path=...;%PATH_PYTHON36A%
See how easy that was?看到那是多么容易吗?
The problem is that the GUI doesn't seem to like this for the local variables.问题是 GUI 似乎不喜欢这个局部变量。 I can confirm that this is the case because when I remove the variables from the local path, I get the nice list like the System Variables case.
我可以确认情况确实如此,因为当我从本地路径中删除变量时,我会得到像系统变量案例一样的不错的列表。 However, what is perplexing to me is that the System Variables path DOES include some variables as well:
然而,令我困惑的是,系统变量路径确实也包含一些变量:
So I take this to mean that there must be a way of getting the local variables list to pop up, just like the System Variables case...所以我认为这意味着必须有一种方法可以让局部变量列表弹出,就像系统变量的情况一样......
Guess I'm late to the party, but this works for me:猜猜我参加聚会迟到了,但这对我有用:
PATH=C:\\DATA\\bin;%JAVA_HOME%\\bin PATH=C:\\DATA\\bin;%JAVA_HOME%\\bin
whereas this does not work:而这不起作用:
PATH=%JAVA_HOME%\\bin;C:\\DATA\\bin PATH=%JAVA_HOME%\\bin;C:\\DATA\\bin
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.