Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get users desktop location?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01681485
Message ID:
01681486
Views:
61
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform