Jump to content

Recommended Posts


Posted

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!

  • 2 months later...
Posted

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.?

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...