How to change TEMP environment for ALL users

I need a way to set my Windows 7 so that each time I add a new user to the PC it inherits the TEMP and TMP environment settings to C:\Temp instead of default windows 7 location (%USERPROFILE%\AppData|Local|Temp).

I have seen this cannot be done by changing the HKEY_CURRENT_USER in the Admin account, as it doesn't keep persistent thru all users.

I need this way works also for all existent users, modifying their TEMP environment centrally from Admin account.
LVL 14
Fabio MarzoccaFreelancerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jakethecatukCommented:
You need to change the registry value for HKEY_USERS\.Default\Environment\Temp to what you need.

Any new users that login will get the new value - this does not affect existing users thoug.
0
Fabio MarzoccaFreelancerAuthor Commented:
Thanks jake.. any way to change also on existing users?
0
jakethecatukCommented:
Under HKEY_USERS will be all the users starting with S-1-5- etc.  Under each tree will be the Environment variables sub tree.  You can change it in there.
0
Fabio MarzoccaFreelancerAuthor Commented:
I have just tested as you said, modifying HKEY_USERS\Default\Environment  with the new directory. Created a new user, but the environment is still the default one: %USERPROFILE%\AppData|Local|Temp
0
jakethecatukCommented:
Sorry about that...been a long time since I've done this.

This works as I've just done it: -
1) Modify Explorer settings to let you see hidden files
2) Go to Start-> Run -> type regedit
3) In the left pane of Registry Hightlight HKEY_USERS
4) Go to File -> Load Hive
5) Look in C:\Users\Default users and import ntuser.dat (name it Default user)
6) Look for key HKEY_USERS\Default user\Environment
7) modify TEMP and TMP to C:\TEMP
8) Unload Hive

You will have to do it this way for all users as well.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Project Management

From novice to tech pro — start learning today.