Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WSH: how to get dfault TEMP dir
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00394247
Message ID:
00580334
Views:
28
>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:
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform