Easy methods to set an surroundings variable in Home windows 10

Surroundings variables are world values used to configure applications working in your PC. Though they sound technical, they’re actually only a shared configuration retailer for various apps to hook into.

Surroundings variables are tied to particular person person accounts, so totally different customers can have totally different configurations. There are additionally world system variables, akin to “%windir%”, which at all times factors to the listing the place Home windows is put in (e.g. “C:Home windows”). As a substitute of hardcoding this worth, apps can as an alternative reference “%windir%” when they should entry the Home windows listing.

Editing environment variables in Windows 10

Many apps add their very own surroundings variables after set up. To view and edit your surroundings variables, seek for “edit surroundings variables” within the Begin menu and choose the consequence which seems.

Right here, you’ll be able to see all of the surroundings variables which have been set in your machine. Within the instance above, you’ll be able to see the “OneDrive” variable factors to the OneDrive storage listing for the present person – when you change the OneDrive listing from the OneDrive system tray, this worth will replace accordingly.

Editing environment variables in Windows 10

As a result of OneDrive is an surroundings variable, applications can get the situation of your OneDrive listing utilizing “%OneDrive%” in paths. You possibly can even do that out your self – press Win+R to open the Run immediate and kind “%OneDrive%” to open your OneDrive folder.

To edit an surroundings variable, choose it from the listing and click on “Edit.” Use the popup immediate to vary the variable’s title and worth. Nevertheless, take care when enhancing variables you did not create – an incorrect worth may stop a program, or all the system, from working correctly.

Viewing environment variable in Command Prompt in Windows 10

Creating a brand new variable is a equally easy affair – click on the “New” button and fill out the title and worth. Bear in mind although that surroundings variables do nothing on their very own. Since no program will use your variable, it’s going to haven’t any impact. Nevertheless, you will get the worth of your surroundings variable utilizing the Command Immediate – launch it from the Begin menu and kind “echo %<myvariable>%”, changing “<myvariable>” along with your variable’s title, to see its worth displayed.

Share This Publish:

Supply hyperlink