Windows Add To Path

Posted on by  admin
Windows Add To Path Rating: 8,2/10 9491 votes
  1. Windows Add To Path For User
  2. Windows Add To Path Variable
  3. Windows Add To Path With Spaces

If you wish to stick with your previous version of Python, you may apply the steps below to manually add Python to Windows path. Note that I’ll be using Windows 10 to demonstrate the steps, but similar principles would apply for previous versions of Windows. Step 1: Get to the Windows Environment Variables screen. To get to the Windows Environment Variables screen, where you can add new paths, simply right click on the ‘This PC‘ icon. From the Desktop, right-click the Start button and click System. After the System screen appears, select Advanced system settings. This will open the System Properties window. Select the Advanced tab and then the Environment Variables button. Under the System variables section, scroll down and highlight the Path variable.

The question pretty much says it all; I have users who do not have permission to edit their own PATH environment variable and if they need to have it modified for some reason, they need to log out so an Admin can log in and change the PATH for them, before the user logs back in again. This isn't ideal. Can it be done in a better way?

EEAA
103k16 gold badges149 silver badges221 bronze badges
ninesidedninesided

6 Answers

You can always invoke a cmd shell with administrator rights (or any other runas method), and use a tool such as SETX to modify the path permanently. Existing shells and/or running programs will probably be using the old path, but any new shell/program will use the new settings.

BerzemusBerzemus
8372 gold badges9 silver badges19 bronze badges

For accounts without admin privileges:

Open 'User Accounts' and choose 'Change my environment variables' (http://support.microsoft.com/kb/931715).

This dialog will show you your current user variables as well as the system variables. You may need to add a local PATH variable if you haven't already.

To update your Path to include the Python 3.3 directory, for instance, click New:

Variable Name: PATHVariable Value: %PATH%;C:Python33

This creates a local PATH by taking the current system PATH and adding to it.

Curtis NelsonCurtis Nelson

My Computer / Properties / Advanced / Environment Variables. Changes there take effect immediately except for already open command prompt windows. No need to log out and back in.

NOTE: If you don't have access to that window, you might be able to get it by running rundll32 sysdm.cpl,EditEnvironmentVariables from the Run window or command-line.

slm
5,18612 gold badges44 silver badges60 bronze badges
John GardeniersJohn Gardeniers
25.1k9 gold badges48 silver badges105 bronze badges

In a command prompt you can do:

but this only changes it for the command prompt (and any apps launched from the command prompt). Assuming you want this to apply to everything the user does you change the users environment variables. Right click My Computer, Properties, Advanced, Environment variables and in the 'User variables for add a variable:

Windows

When the user logs in this gets added to the system wide path.

John RennieJohn Rennie
7,4281 gold badge19 silver badges30 bronze badges

The user can set a PATH variable at a command-prompt that will override the system-wide PATH variable, even if the user doesn't have 'Administrator' rights. The change will take effect for new processes the user starts from that command prompt. (The existing Explorer process, and any other processes the user is running when the change is made, will not 'see' the change.)

Evan AndersonEvan Anderson
136k14 gold badges175 silver badges314 bronze badges

In addition to the answers above, you can also update the registry (which has the advantage of being scriptable):

The PATH variable is stored in HKEY_CURRENT_USEREnvironment.

To read the current path:

To append a value c:somedir to the path:

Note that processes read the environment when being launched, so you would have to restart the process for it to get the new path.

Update: Another way I found is to run:

Again, this applet edits the registry and has the same effect as the above.

Kristopher NoronhaKristopher Noronha

Not the answer you're looking for? Browse other questions tagged windowsenvironment-variablespath or ask your own question.

This question already has an answer here:

It fixes the Zebra stripes from the stepper motors that UMO, UM2 and UM3 use (as it today 6 August 2017). Left is WITH the TL-Smooth, Right is. Motor umo 6 upute. Oct 21, 2017 - Manual - How to install TL-Smooth - Zebra Strippes Fix UMO - UM2 - UM3? By neotko, August 6, 2017 in Modifications, third party add-ons. So try to move a bit the motor where it's before launching a print and check it's fine. The information contained in this manual is intended to be accurate. However, the. Half Voltage Field Connection (Shunt Wound Motors Only). Jun 1, 2018 - University Park Manual 2018. Materials with the UMaine Police Department, Rangeley Road, 207.581.4040. All motor vehicles parked in University Park parking lots must be registered.

  • What are PATH and other environment variables, and how can I set or use them? 4 answers

How do I set a system environment variable in Windows 10 (without using the registry editor)?

(Note: Other answers don't specifically address Windows 10 - at least not yet - and they leave off important steps - like how to open the control panel - that changed since previous versions of Windows.)

Jared
JaredJared
1,1662 gold badges9 silver badges13 bronze badges

marked as duplicate by DavidPostill windowsMar 13 '16 at 14:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

9 Answers

PowerShell method

You can list all environment variables with: Get-ChildItem Env:.

To get the value of a specific variable: $Env:PATH, where PATH is the name of the variable.

To set a variable: [Environment]::SetEnvironmentVariable('PATH', 'C:TestPath', 'User'), the first parameter is the name of the variable, the second is the value, the third is the level of.

There are different ways to work with environment variables and certain quirks with them in PowerShell so consult the link for details.

Old method (no longer available in newer Windows 10 updates, use PowerShell or see other answers)

Go into Settings and click on System.

Then on the left side click About and select System info at the bottom.

In the new Control Panel window that opens, click Advanced system settings on the left.

Now in the new window that comes up, select Environment Variables.. at the bottom.

MC10MC10
6,9022 gold badges24 silver badges41 bronze badges

Still the same as ever: It’s in the old-style control panel’s “System” thingy. You can reach it with WinBreak or by right-clicking the Start button.

From there, select “Advanced system settings” → “Environment Variables”.

Or you can do it the hard way and find some other entry point to the old-style control panel, like the Network and Sharing Center or the Desktop folder(!).

Windows Add To Path For User

Daniel BDaniel B
36k8 gold badges70 silver badges89 bronze badges

I typed 'envir' in the 'Search the web and Windows' box and selected 'Edit environment variables for your account' under the 'Best Match'

ColinColin

If by 'system environment variables' you refer specifically to system-wide environment variables, then other answers have already covered this. However, if you want to edit both system-wide and user-specific environment variables then most (if not all) of these answers are inapplicable in general case.

Going through 'System' and then “Advanced system settings” -> “Environment Variables” will only work for accounts from Administrators group, because only such accounts have access to “Advanced system settings”.

If you attempt do that from a regular user account, then trying to access “Advanced system settings” will trigger an UAC prompt asking you for administrator password. If you enter the password, “Advanced system settings” will successfully open, but any user-specific changes you make there will apply to the corresponding administrator's account (!), not to your original user's account.

In order to solve this problem (i.e. in order to give regular users the opportunity to edit their own environment variables) Windows provides another way to access the “Environment Variables” dialog.

Open Control Panel. Open User Accounts applet. On the left-hand side of that applet you will see a link that says Change my environment variables. Click that link, and it will take you to the same “Environment Variables” dialog for your user's environment variables.

If your user has administrator rights, you will be able to edit both sections of that dialog: user-specific environment variables (upper section) and system-wide environment variables (lower section). If you don't have administrator rights, you will only be able to edit the upper section: your own user-specific environment variables.

This is the proper way to edit environment variables in all post-UAC versions of Windows, not what is suggested in the majority of the answers above.

Unfortunately, Windows 10 November update (version 1511) destroyed this functionality. The Change my environment variables link no longer works. It is there, but it is dead. So for the post-November version of Windows 10 the correct answer is: it is generally impossible to edit user-specific environment variables in version 1511 of Windows 10 from regular user accounts. Microsoft has destroyed Windows 10 with this update and Windows 10 is now unusable. It will remain the case until they fix these ridiculous bugs in 1511 version of the OS.

For the time being one workaround for non-administrative accounts is to, well, add your user account to Administrators group, logout, log back in, edit the variables using 'System' -> “Advanced system settings” method, and then take away administrative rights again..

An alternative workaround is to use PowerShell features as described herehttps://technet.microsoft.com/en-us/library/ff730964.aspx

Windows 10 Anniversary Update (version 1607) released August 2, 2016 finally fixed this bug.

AnTAnT
6862 gold badges10 silver badges17 bronze badges

Just hit +R) at the same time to get command prompt. Then type sysdm.cpl, go to advanced and select Environmental Variables

Journeyman Geek

Windows Add To Path Variable

114k44 gold badges223 silver badges379 bronze badges
user508751user508751

I also experience the problem described by many users in this thread, i.e. the link to the dialogue to set the environment variables of non-admin users is dead. As a simple workaround I have downloaded this nice tool:

It is portable and requires no permissions to install, it is simple to use, and actually provides a better overview of the variables than the system dialogue anyway.

Hope this helps.

krcoolskrcools

If you are not afraid of the command line, you should check out the command setx.

I quote from its description:

Creates or modifies environment variables in the user or system environment. Can set variables based on arguments, regkeys or file input.

(Note that this command does not affect the current command shell's environment, only the environment of new processes, so you'll need to open a new command shell to see any changes.)

fogbankfogbank

I found at least one way:

In the 'Search the web and Windows' box on the taskbar, type 'environment variables' then select 'Edit the system environment variables' then click 'Environment variables'

JaredJared
1,1662 gold badges9 silver badges13 bronze badges

In windows 10, changing the environment variables has not changed, It is the same as in windows 7:Right click on This PC (My Computer).Left Click Properties.Left Click Advanced system settings.Left Click Environment Variables..

At this point you can change the variables for the current user or the system

Rob MooreRob Moore

Windows Add To Path With Spaces

Not the answer you're looking for? Browse other questions tagged windowswindows-10 or ask your own question.

Comments are closed.