Setting system and user variables in Windows 11. How to set an environment variable in Windows. On the desktop, find the "This PC" icon and right-click it. Now select "Properties" from the context menu. In the window, go to "Advanced system settings" and in the "Advanced" tab, click "Environment Variables...".
Registry Editor
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
Account environment variables are located:
HKEY_CURRENT_USER\Environment
Command Prompt
set
Terminal
dir Env: