[python-win32] %TEMP% directory
Tim Roberts
timr at probo.com
Mon Jan 7 23:40:12 CET 2008
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.
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the python-win32
mailing list