Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Win API that returns User folder path?
Message
From
29/07/2003 13:26:27
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00814598
Message ID:
00814612
Views:
9
Tom,

Yep, looks like I overlooked that. I had been keyed to use a WinAPI call because of some conversations with others, including my boss<g>, so I guess I was looking "outside the box" when I should have stayed inside<bg>.

Thanks very much,
Mark

>Maybe I missing something, but doesn't GETENV('TEMP') return exactly what you need?
>
>>Hi All,
>>
>>I am upgrading the security modules of several legacy VFP apps where the Temp folder was set to either \Windows\Temp or \WinNT\Temp. Now with new restrictions enforced, these apps can no longer write to any folder outside of the \Documents & Settings\username folder location on their Win 2000 or Win XP machines.
>>
>>Does anyone know of a Windows API call that will return the fully qualified path string of "[drive]:\Documents & Settings\[username]\Local Settings\Temp" for WinXP and Win2000 PCs ?
>>
>>It looks like I should be testing for the System Environment User variable "TEMP" for each user on their own PC. I think this variable value is needed so that I can get the correct path to the user's \TEMP folder for writing and retrieving user token, .ini, and temp files from there.
>>
>>When checking "System \ Advanced \ Environment Variables" in the Control Panel of my own Win XP PC, it shows that the edit value of this setting is "%USERPROFILE%\Local Settings\Temp". I am expecting that each user's name string is their network UserId which conforms to the convention "FirstInitLastName" for all users.
>>
>>Is there something like a GetWinVar("TEMP") kind of function to return the fullpath, or can VFP code resolve the %USERPROFILE% percent operators ?
>>
>>Grateful for any ideas, Thanks.
Mark Rietman
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform