Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pointing to my desktop with getfile
Message
 
To
08/10/2007 04:08:03
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01259339
Message ID:
01259345
Views:
27
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform