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 am in an IT lock-down situation so I have limited access to things. I am trying to run the latest version of Portable Google Chrome 6. It won't let me install extensions and I think it's because I can't access my TEMP and TMP files, and for other reasons as well, I want to be able to change the temp variables with my daily run batch file. My code works fine but works only when my CMD window is open:


ECHO.Remaping TMP Drive

So I am reading these tips and I just can't get it. How can I check where System variable are stored for my Current User (HKCU)

share|improve this question
up vote 1 down vote accepted


reg add HKCU\Environment /v TEMP /t REG_SZ /d "%%HOMEDRIVE%%%%HOMEPATH%%\Temporary"
share|improve this answer
This looks like what I was about to try can add rewrite a value that already exists? – getthemike Sep 22 '10 at 14:42
@lazfish: yes, add /f – grawity Sep 22 '10 at 14:54
OK Looks like it works but when I ECHO.%TMP% and %TEMP% I still get the default. So I go to change it with: reg add "hklm\system\CurrentControlSet\Control\Session Manager\Environment" /v TEMP /t REG_SZ /d "%%HOMEDRIVE%%%%HOMEPATH%%\jnk" /f reg add "hklm\system\CurrentControlSet\Control\Session Manager\Environment" /v TMP /t REG_SZ /d "%%HOMEDRIVE%%%%HOMEPATH%%\jnk" /f Instead and I get Access is denied. – getthemike Sep 22 '10 at 15:13
The reg add call won't modify the env var values in your current shell, just values for new shells. You'll still need the set TEMP=... calls to see the changes in your current shell. – Ian C. Sep 22 '10 at 15:19
I noticed that. It it looks like the TEMP & TMP paths are using the Machine location instead of local user because even new shells show default for ECHO.%TMP% IT has got me. What can I say? – getthemike Sep 22 '10 at 15:42

The easiest way to make permanent changes to environment variables is: Control Panel > System > Advanced tab > Environment variables. The upper section contains variables for the current user.

share|improve this answer
Can't access, also I would have to do it everyday. – getthemike Sep 22 '10 at 14:24

I've used the SetEnv tool from BAT scripts to make permanent changes to environment variables. Works well. It's a shame it's not part of the Windows OS install. It's worked all the way to Vista for me. I haven't tried it in Windows 7.

share|improve this answer
SETX is standard on Vista/Win7 (and in the WinServer resource tools for earlier versions). – paradroid Sep 22 '10 at 16:30

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.