Setting user TEMP/TMP env.variables?

G

Glenn

hi all,

My problem today with Terminal Server is :) 'Setting the TEMP/TMP
environment variables per user using logon batch routine'

The system is a windows 2000 terminal server sp3.

As a possible cause for a malfunction within another application,
the %TEMP% location was mentionned. By default, it resolves into:
c:\documents and Settings\<User>\Local Settings\Temp\<SessionID>

This being possibily too long for the application to cope with, it was
suggested to shorten the path.

I thought: easy!
I just set the value in the usrlogon.cmd script to the user home
directory as follows:
set TEMP=%RootDrive%\temp

(%Rootdrive% being the user home directory which resolves to W: and
which, itself, is a SUBSTed directory to c:\documents and Settings
\<User>)

After logon, nothing had changed.

Google showed me FlatTemp.
I ENabled flat temporary directory using FLATTEMP.exe /enable
and DISabled the setting "Use Temporary folders per Session" in Terminal
server configuration
(I have also restricted users to one single simultaneous session)

After logon, however, the temp env.vars still point to c:\documents...
etc.

while executing the usrlogon.cmd the value gets set to W:\temp (as it
should).
After this script completes, something changes it again to the c:\doc...

I then remove the variables TEMP/TMP in the user profile (system control
panel)
Now after logon, the temp variable is set to the system temp value.

How can I stop this?
best regards
glenn
 
T

TP

Use setx if you want the environment variable to
persist. It is in the resource kit.

Something like:

setx TEMP "%RootDrive%\temp"

Thanks.

-TP
 
G

Glenn

Use setx if you want the environment variable to
persist. It is in the resource kit.

Something like:

setx TEMP "%RootDrive%\temp"

it seems to take after a logoff/logon. I had also to rearrange the
usrlogon.cmd script somewhat as the temp dir is used by Setpath.cmd
before the drive/dir is subst'ed by the script.

fingers crossed for the troublesome app now
yes thanks indeed :)
bye
glenn
8<
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top