Re: Problem with Path.GetTempFileName

Tech-Archive recommends: Fix windows errors by optimizing your registry



I already know that. My serviced component is loading the user profile
(successfully all times). To be more specific about "SOMETIMES" in my
previous post, it seems for me that the very first time the component is
loading by COM+ after a system restart, the behavior of GetTempFileName is
incorrect. If I shut down the COM+ running process, everithing is fine when
it is restarted upon request until the next system restart.

"LOZANO-MORÁN, Gabriel" <gabriel.lozano@xxxxxxxxxxx> wrote in message
news:uhp0ZTzSFHA.1384@xxxxxxxxxxxxxxxxxxxxxxx
> The GetTempFileName() method uses the GetTempPath() function of the
> kernel32.dll and there is a search order to get the path:
> 1.. The path specified by the TMP environment variable.
> 2.. The path specified by the TEMP environment variable.
> 3.. The path specified by the USERPROFILE environment variable.
> 4.. The Windows directory.
> Gabriel Lozano-Morán
>
> "Olivier Matrot" <olivier.matrot@xxxxxxxxxxxxx> wrote in message
> news:Ovs0ZKySFHA.580@xxxxxxxxxxxxxxxxxxxxxxx
>> I have a serviced component that is running in COM+ under a specific
>> local
>> user identity. Despite the fact that the process is running in the
> specified
>> identity, Path.GetTempFileName SOMETIMES returns a filename located
>> %windir%\temp.
>>
>>
>
>


.