[python-win32] %TEMP% directory

le dahut le.dahut at laposte.net
Tue Jan 8 09:32:32 CET 2008


No it is not, it is a fresh installed XP, and the same problem occurs on 
undreds of machines running XP and 2k. But I forgot to precise that once 
the session is opened and the desktop is completely loaded, %TEMP% 
points to the correct directory (C:\Doc & Settings\<user>\...\temp).

This strange behaviour occurs only at logon. If someone has any ideas or 
addresses where I can find some ideas ?

Tim Roberts a écrit :
> le dahut wrote:
>> I've a strange behavior with windows XP, %TEMP% points to %WINDIR%\TEMP 
>> instead of "C:\Documents and Settings\<USERNAME>\Local Settings\Temp" at 
>> logon time. Since I have a program that uses temp files it can write 
>> there when a non-admin user logs on so it failed with traceback etc.
>>
>> Why ? Is there a KB article about that ?
>>   
> 
> This is almost certainly a machine that used to run Windows 9X, and was 
> upgraded in place to XP.  On 9X, there was no "Documents and Settings" 
> directory, so temp files went into \Windows\TEMP, and the XP upgrade 
> process tries to maintain that.
> 
> I would think that MANY things would fail if %TEMP% were not writable.
> 
> You could fall back to %USERPROFILE%\Local Settings\Temp, I suppose.
> 


More information about the python-win32 mailing list