User-level environment variables in Windows can be set without admin rights.
The easiest way to set or change an environment variable for the current user is by using the built-in graphical editor for environment variables.
Alternatively, an environment variable for the current user can be set without administrative privileges using the Windows PowerShell.
Cool Tip: Add a directory to Windows
%PATH% environment variable! Read More →
Set Environment Variable Without Admin Rights
To start the environment variables editor – press the
Win keybutton to open the “Start” menu, type in
envi and click on “Edit environment variables for your account”.
The environment variables editor can also be launched with the following command from the Windows command-line prompt (CMD):
C:\> rundll32 sysdm.cpl,EditEnvironmentVariables
Alternatively, an environment variable for the current user can be set without admin rights using the Windows PowerShell:
PS C:\> [Environment]::SetEnvironmentVariable("<varName>", "<varValue>", "User") - example - PS C:\> [Environment]::SetEnvironmentVariable("HOME", "C:\path\to\home", "User")
Note: Start a new PowerShell session to get the updated environment variables.
List all environment variables:
PS C:\> Get-ChildItem Env:
Show the particular environment variable:
PS C:\> Get-ChildItem Env:<varName> - example. - PS C:\> Get-ChildItem Env:HOME