Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get users desktop location?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01681485
Message ID:
01681486
Vues:
62
>I have an app that has this bit of code in it:
>
>myfolder = 'C:\USERS\' + ALLTRIM(cUserID) + '\DESKTOP\DRS Excel Files\'
>
>My problem is that now some of the users are on Citrix and using onedrive, so this location is no longer valid. Isn't there a SYS() function or something I can run to get the logged in users' desktop folder location???
>
>Thanks everyone.

IMHO:
DECLARE INTEGER GetUserName     IN ADVAPI32.DLL STRING @, INTEGER @
lclpBuffer=REPLICATE(CHR(0), 100)
liSize=LEN(lclpBuffer)
lii=GetUserName(@lclpBuffer,@liSize)
?LEFT(m.lclpBuffer, m.liSize)
or:
SUBSTR(SYS(0), AT("#", SYS(0))+2)
MartinaJ
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform