Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pointing to my desktop with getfile
Message
 
À
08/10/2007 04:08:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01259339
Message ID:
01259345
Vues:
26
>Thnx Borislav you saved my day. :)

Because some sysadmins uninstall Scripting on computers you could consider to use API functions instead of Scripting object:
#define CSIDL_DESKTOPDIRECTORY 0x0010
#define ERROR_SUCCESS          0x0000

DECLARE INTEGER  SHGetFolderPath IN shell32.dll INTEGER hwndOwner,;
                                                INTEGER nFolder,;
                                                INTEGER hToken,;
                                                INTEGER dwFlags,;
                                                STRING @pszPath
                                             
lcDeskTop       = SPACE(255)
IF SHGetFolderPath(0, CSIDL_DESKTOPDIRECTORY, 0, 0, @lcDeskTop) == ERROR_SUCCESS
   lcCurrentFolder = SYS(5)+CURDIR()
   cd (lcDeskTop)
   ? GETFILE()
   cd (lcCurrentFolder)
ENDIF
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform