Problems with TEMP and TMP environment variables

Please report only one bug per message!

Moderators: Stefan2, white, sheep, Hacker

Post Reply
gs12
Junior Member
Junior Member
Posts: 2
Joined: 2012-04-05, 10:23 UTC

Problems with TEMP and TMP environment variables

Post by *gs12 » 2012-04-05, 10:55 UTC

Hello,
I'm using Total Commander Version 7.56a 32 bit (16.12.2010)
on Windows 7 SP1 64bit.

Often but not reproducable I get error messages that the path "C:\Users\SYSTEM\AppData\Local\Temp\_tc" is not available when viewing files in an archive with Lister.

If I open a command shell from TC afterwards the TEMP and TMP environment variables have wrong values.
The should be set to "C:\Users\MyAccountName\AppData\Local\Temp" but are set to "C:\Users\SYSTEM\AppData\Local\Temp".
Then I restart TC and the problem disappaers.

My TEMP and TMP environment variables are set to "C:\Users\%USERNAME%\AppData\Local\Temp".
Is this a problem for TC ?

I will change it to "C:\Users\MyAccountName\AppData\Local\Temp" and see if this fixes the problem.

Best regards.
gs12

User avatar
HolgerK
Power Member
Power Member
Posts: 5085
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK » 2012-04-05, 13:14 UTC

Do you use a trick like this:
http://www.howtogeek.com/howto/windows-vista/create-administrator-mode-shortcuts-without-uac-prompts-in-windows-vista/
to start TC?

In this case you should control whether you have selected the system-account instead of your own account (see the second picture from the linked site).

Regards
Holger

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 37631
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2012-04-05, 15:45 UTC

TC may be getting notifications from the system about changed environment variables. You can turn this off by adding the line
UpdateEnv=0

to wincmd.ini section [Configuration].
Author of Total Commander
http://www.ghisler.com

User avatar
MVV
Power Member
Power Member
Posts: 8323
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV » 2012-04-05, 16:55 UTC

gs12, maybe you're using some TC plugin (maybe some packer plugin) that changes variables TEMP and TMP to wrong values? I've never seen such strange thing myself.

As I see, my processes that are started with SYSTEM account have C:\Windows\Temp folder as TEMP and TMP, not C:\Users\SYSTEM\AppData\Local\Temp.
And, tasks that are started by task sheduler with my account have correct variable values. I have Win7x64SP1 too.

gs12
Junior Member
Junior Member
Posts: 2
Joined: 2012-04-05, 10:23 UTC

Post by *gs12 » 2012-04-11, 10:40 UTC

HolgerK wrote:Do you use a trick like this:
URL
to start TC?
No TC is started with a normal shortcut.

Since I changed the setting of the TMP and TEMP variables as announced (avoid %USERNAME%) the problem did not occur anymore.

Post Reply