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:
01681511
Vues:
67
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform