Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Win API that returns User folder path?
Message
 
À
29/07/2003 13:08:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00814598
Message ID:
00814607
Vues:
11
>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.
? GETENV("USERPROFILE")
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform