How to export Environment Variables in Windows

There is a way to export and import Environment Variables in Windows. That is export the registry keys which store those variables.

For System Variables, open registry editor (cmd > regedit):

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment

For User Variables:


Then you can import these registry keys into other windows machines.