Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have borrowed a laptop with Windows XP from a company that I will do a project for. They say that I have almost Admiinistrator rights on the computer so that I can install software.

Now I have installed a few development tools, but I need to add a few things to the PATH environment variable. But I don't seem to have permissions to edit the PATH environment variable. Is there any way I could workaround this? Could I create a personal environment variable PATH that is used instead?

share|improve this question
Also see… – Pat Jul 29 '13 at 19:13
up vote 1 down vote accepted

I'm not sure about whether your rights will allow it but you can try setting the path for a command window with path = %PATH%;newdir; if it works, it will last until the command window is closed. This may be ok for you if you are mostly working at the command line.

There is also the setx tool that you could try if your rights allow you to install it.

Here is some additional information about the environment variables that may prove useful.

share|improve this answer
I tried this and tested setx but I got this message: Access is denied. I don't think it's possible to fix this. I have to contact the company. Thanks anyway. – Jonas Sep 17 '10 at 8:26
The correct syntax in cmd shell is set path=%path%;newdir - note the set prefix and no whitespace around = – grawity Sep 17 '10 at 13:47
@grawity The set is deliberately missing. Jonas explained in the question that he wasn't allowed to use set to set the path. I wasn't sure where the block came in so I was pointing out a way to change the path for the current command window, with the hope that this might not be prevented by the lack of admin rights. I didn't bother listing the standard methods of changing the path because I read the question which told me they didn't work. – Neal Sep 18 '10 at 1:03
The question does not mention set anywhere. There's more than one way of editing environment; maybe Jonas was talking about the GUI. (Besides, it is not possible to disable the set builtin except by patching cmd.exe, and even then there are many ways to get around it.) – grawity Sep 18 '10 at 19:39

Yes, you can create your own environment.

  • GUI:
    • System Properties -> Advanced -> Environment Variables
      • Or, if you don't have access this way, you might be able to get it by running rundll32 sysdm.cpl,EditEnvironmentVariables from the Run window or commandline.
    • Click Add, enter PATH as name and %PATH%;mynewdir as value. (You don't need to include %PATH% via the GUI, especially if you are editing an existing PATH variable; it just holds the string value of PATH before you made edits.)
    • This is the only method that ensures instant availability to all future processes launched by Explorer, without the need to re-login.
  • Kinda GUI:
    • regedit -> HKEY_CURRENT_USER\Environment
    • Right-click, New -> Expandable String Value
  • CLI:
    • reg add hkcu\environment /v PATH /t reg_expand_sz /d %%PATH%%;mynewdir
    • Doubled %% is required to prevent %%PATH%% from being expanded by shell.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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