Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get users desktop location?
Message
 
À
21/06/2021 18:27:58
John Ryan (En ligne)
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01681485
Message ID:
01681509
Vues:
43
>
Getenv("userprofile")+"\desktop\
>
>>>The above will not work.
>
>How come? I thought this would be the User Profile environment variable used by Windows itself. I suppose it's possible desktop goes somewhere else in some Citrix configs, is that the objection?
>
>>>You need to use something like this:
>
objSFolders = CreateObject("WScript.Shell")
>
>Should also be fine unless PC is locked down...
>
>To Victor/whoever: if you fire up Command Prompt (cmd) and type SET, it displays the available environment variables and current content, which may give you some pointers.

John, I ran your code and it gave me a folder on the C drive. My desktop and all data is on my D drive.

I seriously doubt that that object WScript.Shell is not available.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform