我的环境变量在Vista32上设置在哪里? [英] Where are my environment variables set on Vista32?

查看:174
本文介绍了我的环境变量在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆