>I'm running VFP COM+ servers under discrete user accounts. I want to use the System temp directory because it's consistent for the machine - as a ferinstance, I want to setup transaction-centric logging for my COM objects to be the System Temp directory, so no matter how the objects logon, I can say "save log to tempdir\tlog" and it's always in the same place. It gets even more confusing when the objects are running in a server farm, because the directory on one host will probably be different on each machine, so log collection gets to be a mess.
>
>In the Win2K Control Panel, I can see that the System has a different %TEMP% path than the users, how can I grab that? There's got to be a way....
>
SHGetFolderPath() should be able to retrieve the System user's default - you'll need to use the MSDN docs to find the proper CSIDL. See the MSDN docs for SHGetFolderPath(), and the entry
CSIDL Values.
>
>>The user Temp folder is the Windows Temp folder for all intents and purposes, although the content of the system process' TEMP environment variable may be different than the TEMP variable in the current user context. You can always fall back on the GetTempPath() API call: