Vista32 上我的环境变量设置在哪里?

发布于 2024-10-19 12:08:12 字数 583 浏览 8 评论 0原文

通过以下方式:

开始 ->电脑->右键单击->属性->高级系统设置->高级->环境变量

我找到了brianjd的用户变量(其中包括TMPTEMP)和系统变量 (其中包括路径用户名等)。我希望这些变量在 C:\AUTOEXEC.BATC:\CONFIG.SYS 中设置。相反,我在这些文件中找到了 NTVDM 的 REM Dummy 文件FILES=40

问:实际使用 SET USERNAME=brianjd 等语句设置环境变量的文件在哪里?

问:当我按照上面的 Windows GUI 路径并将变量名称和值 FOOC:\foo 添加到 brianjd 的用户变量 时或系统变量,到底发生了什么? Windows 将什么内容写入何处?

By following:

Start -> Computer -> Right Click -> Properties -> Advanced System Settings -> Advanced -> Environment Variables

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.

Q: Where are the files that actually set the environment variables with statements like SET USERNAME=brianjd?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

英雄似剑 2024-10-26 12:08:12

例如,变量不在 Linux 上的 /etc/environment 等脚本文件中。 Windows 将它们存储在注册表中。键是“HKCU\Environment”(用户变量)和“HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment”(系统范围变量)。

另请参阅相关的 MSDN 文章

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).

See also the relevant MSDN article.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文