如何导出和导入Windows中的环境变量? [英] How to export and import environment variables in windows?
问题描述
我发现很难在不同的机器上保持我的环境变量同步。我只想从一台计算机导出设置并导入到其他计算机。
I found it is hard to keep my environment variables sync on different machines. I just want to export the settings from one computer and import to other ones.
我认为应该是可能的,但不知道该怎么做。有人可以帮我吗谢谢。
I think it should be possible, but don't know how to do it. Can anyone help me? Thanks.
推荐答案
您可以使用RegEdit导出以下两个键:
You can use RegEdit to export the following two keys:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
HKEY_CURRENT_USER\Environment
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment HKEY_CURRENT_USER\Environment
第一组是系统/全局环境变量;第二组是用户级变量。根据需要进行编辑,然后在新机器上导入.reg文件。
The first set are system/global environment variables; the second set are user-level variables. Edit as needed and then import the .reg files on the new machine.
这篇关于如何导出和导入Windows中的环境变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!