fb
Homepage 5 How-to Articles 5 How to Change Environment Variables on Windows OS

How to Change Environment Variables on Windows OS

Manage remote endpoints, deploy software and patches with Action1 cloud RMM solution.

Sign up and use free on up to 50 endpoints with no functionality limits or expiration.



June 14, 2019

An environment variables is a short reference to an object in the system. Using such abbreviations, for example, you can create universal paths for applications that will run on any PC, regardless of user names and other parameters.

In many situations, it’s necessary to set application specific environment variables for testing and debugging purposes. These kind of variables are exclusive to the application and will be dead when the application exits. For example, suppose if you’ve a rendering application in which the rendering path is specified as environment variable. Sometimes it might be necessary to change these variables for testing or in some situations you may need to add or delete the existing one. In most cases, the application specific variables are controlled launching through script files after setting up necessary variables or by a launcher application (Environment variables are inherited from Parent Process). Still dynamically updating variables is out of our reach.

1. Using a Graphical User Interface to Change Variables

You can get information about existing variables in the system properties. From the Control Panel, open the System applet or right click mouse button on the Computer shortcut on the desktop and select the Properties

Step 1 to Change Environment Variables is to Use a Graphical User Interface

Select the Advanced tab.

Step 1 to Change Environment Variables is to Select the Advanced tab

In the opened window with the tab “Advanced” we press the button indicated in the screenshot below (Environment Variables button).

how to change environment variables on windows systems

Click the New button under the User variables or System variables box depending on whether you want to create an environment variable that is visible only to the currently logged-on user or system-wide.

System variables box

Enter the variable name and value and click OK until all windows are closed.

changing environment variables windows

2. Using a Command-line Interface to Change Variables

  • Click the search icon on the taskbar or the start button.
  • In the search bar type cmd or just start typing command after opening the Start menu.
  • In the search results, right-click on the classic application Command line.
  • In the menu that opens, select Run as administrator
Step 2 to Change Environment Variables is to open command line

To view environment variables, run the set command. You can also view a subset of environment variables by running set and specifying the first letters of the variable(s). This command displays all environment variables that begin with USER:

set user

Step 2 to Change Environment Variables is to check all veriables

You can use the wmic utility to print environment variables on a remote system:

wmic /node:"" environment list full

use the wmic utility to print environment variables

You can print the value of an environment variable using echo:

echo %Path%

print the value of an environment variable using echo

To set an environment variable for use in the current CMD session, use the set command. The following command sets the FOOBAR environment variable:

set FOOBAR=test

Step 2 to Change Environment Variables is to use command set

Consider Using Action1 to Set Environment Variables if:

  • You need to perform an action on multiple computers simultaneously.
  • You have remote employees with computers not connected to your corporate network.

Action1 is a cloud-based platform for IT management encompassing free MSP tools such as remote patch management, software deployment, remote desktop, software/hardware inventory, endpoint management and reporting.

Related Articles

How To Delete User Profiles Remotely with PowerShell

When a user logs onto the computer for the first time (not via the network to access shared folders or printers), Windows creates a user profile. Among its contents are the NTUSER.DAT file (user profile settings), user-specific folders (My Documents, Desktop, etc.),...

About Action1 RMM

Action1 RMM is a cloud-based IT solution for remote monitoring and management, patching, and remote support.

Start your free two-week trial of Action1, or use RMM tools for free forever on 50 endpoints with no functionality limitations!



0 Comments

Submit a Comment

Your email address will not be published.

cloud patch management solutions action1

MSP Solution

Centralize endpoint management and boost efficiency of IT service delivery.

automated server patch management action compliance

Patch Management

Identify and deploy missing OS and third-party software updates.

cloud software deployment tools windows

Software Deployment

Distribute software and updates across managed endpoints.

software distribution tools software inventory action1

IT Asset Inventory

Keep a detailed inventory and manage hardware and software assets.

web client remote desktop

Remote Desktop

Support users via seamless remote desktop connection.

web based rdp client

Unattended Access

Provide administrative support and manage remote devices.

automated patch management action1

Endpoint Management

Run PowerShell, custom scripts, reboot computers and restart services.

API integrations action1

RESTful API

Integrate Action1 RMM to your IT ecosystem.

computer inventory tool for compliance

Reports and Alerts

Conduct endpoint security audits with comprehensive reporting.