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:
01681511
Views:
66
This message has been marked as the solution to the initial question of the thread.
>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.

We are using this code:
DECLARE LONG SHGetSpecialFolderLocation IN shell32 LONG HWND, LONG nFolder, ;
	LONG @ ppidl
lcPath = SPACE(200)
lnPidl = 0
lnPidlFound = SHGetSpecialFolderLocation(0, 0, @lnPidl)
DECLARE LONG SHGetPathFromIDList IN shell32 LONG Pidl, STRING @ pszPath
lnFolderFound = SHGetPathFromIDList(lnPidl, @lcPath)
lcPath = LEFT(m.lcPath, AT(CHR(0), m.lcPath) - 1)
MESSAGEBOX(lcPath)
Christian Isberner
Software Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform