>Is there an API call or some C++ function that can be called to create a windows .lnk file (shortcut) from VFP. I want to be able to read a dbf file containing exe information and dynamically create a shortcut to the exe on the windows desktop.
>
In addition to the wrapper .DLL approaches referenced by Christof and George (George's wrapper .DLL here on UT is by far the better choice, with much more complete support of the IShellLink API and some useful stuff for finding the current Start Menu and Desktop, you might want to use the OLE Autyomation object Wscript.Shell, part of the Windows Scripting Host, which has a CreateShortcut method that can manipulate shortcuts. The Windows Schipting Host, part of Win98 and WinNT5/Win2K, can be added to any Win9x or WinNT system (in fact, installing IE4 or IE5 should add at least some of the components) by downloading a freelt redistributable self-installing executable from
http://msdn.microsoft.com/scripting. Theres a great deal of functionality in the WSH; three primary automation objects are directly available to VFP (Wscript.Shell, Wscript.Network, and Scripting.FileSystemObject) and it also provides a mechanism to run VBScript or JScript from within your application. John Petersen did an article on the WSH for FoxTalk a few months back, and there have been excellent articles in the magazine
Windows NT Systems over the past couple of months.
>Rick Napolitan
>
>
nappy@twd.net.com