如何在windows中导出和导入环境变量? [英] How to export and import environment variables in windows?

查看:90
本文介绍了如何在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导出以下两个key:

You can use RegEdit to export the following two keys:

HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession ManagerEnvironment

HKEY_CURRENT_USEREnvironment

第一组是系统/全局环境变量;第二组是用户级变量.根据需要进行编辑,然后在新机器上导入 .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屋!

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