我的环境变量在Vista32上设置在哪里? [英] Where are my environment variables set on Vista32?
问题描述
如下:
开始 - >电脑 - >右键点击 - >属性 - >高级系统设置 - >高级 - >环境变量
我发现 brianjd的用户变量
(其中包括 TMP
和 TEMP
)和系统变量
(其中包括路径
, USERNAME
等)。我希望这些变量可以在 C:\AUTOEXEC.BAT
或 C:\CONFIG.SYS
。相反,我在这些文件中找到 REM虚拟文件NTVDM
和 FILES = 40
。
I find User variables for brianjd
(which includes TMP
and TEMP
) and System Variables
(which includes, Path
, USERNAME
, etc.). I would expect these variables to be set in C:\AUTOEXEC.BAT
or C:\CONFIG.SYS
. Instead, I find REM Dummy file for NTVDM
and FILES=40
in those files.
问:实际设置环境变量的文件在哪里,如 SET USERNAME = brianjd
?
Q: Where are the files that actually set the environment variables with statements like SET USERNAME=brianjd
?
问:当我按照上面的Windows GUI路径添加变量名称和值 FOO
和 C:\foo
到 brianjd的用户变量
或系统变量
实际发生了什么?什么是Windows写入到哪里?
Q: When I follow the Windows GUI path above and add the variable name and value FOO
and C:\foo
to either User variables for brianjd
or System Variables
, what is actually happening? What is Windows writing to where?
推荐答案
变量不在Linux上的/ etc / environment等脚本文件中,例如。 Windows将它们存储在注册表中。密钥是HKCU\Environment(用户变量)和HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment(系统范围的变量)。
The variables are not in a script file like /etc/environment on Linux, for example. Windows stores them in the registry. The keys are "HKCU\Environment" (user variables) and "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" (system-wide variables).
另请参阅相关的 MSDN文章。
这篇关于我的环境变量在Vista32上设置在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!