如何在Windows中导出和导入环境变量?

C:\> SET >> allvariables.txt

 

set TODAY=%DATE:~0,4%-%DATE:~5,2%-%DATE:~8,2%

regedit /e "%CD%\user_env_variables[%TODAY%].reg" "HKEY_CURRENT_USER\Environment"
regedit /e "%CD%\global_env_variables[%TODAY%].reg" "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment"

https://qa.1r1g.com/sf/ask/39187151/

posted @ 2020-07-27 23:57  tonggc1668  阅读(709)  评论(0编辑  收藏  举报