Jump to content

Set Tempfolder (c:\Temp) for all users?


Recommended Posts

Hello together,

is it possible to define a tempfolder for all users (like c:\temp)?

The reason is, that I wish to have a C:\Temp folder for all users and not x Tempfolders in the profile from the users.

I´m sure there was a reg. entry. But I´m unable to find the posting...

Edit (found my old posting):

http://www.msfn.org/board/Move-Tempfolder-...ded-t42854.html

Edited by Bastian_W
Link to comment
Share on other sites


Here is a method you can use as part of your unattended procedure; It uses reg.exe from an NT command script to set the locations for all the PC Users to the same location as the default System Temp.

@Echo off&Setlocal
Set "LK_=HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
(Set VD_=/t REG_EXPAND_SZ /d "%%%%SystemRoot%%%%\Temp" /f^>Nul)
For %%? In (T TE) Do Reg add "%LK_%" /v %%?MP %VD_%
Pushd %UserProfile%\..\Default User
Reg load HKU\TempHiv NTUSER.DAT>Nul 2>&1||Goto :Eof
For %%? In (T TE) Do Reg add HKU\TempHiv\Environment /v %%?MP %VD_%
:Un_
Reg unload HKU\TempHiv>Nul 2>&1||Goto Un_

Just change SystemRoot for SystemDrive if you prefer the location to be in the root of the drive instead!

Link to comment
Share on other sites

  • 2 months later...

Hello Yzöwl

Hello RubySoftware

sorry for the delay... I didn´t get a notification about this topic :-(.

Wouldn´t it possible to put a settemp.cmd into:

C:\Documents and Settings\All Users\Start Menu\Programs\Startup

which set and overwrite the temp variables in the reg.?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...