>Can anyone teach me how to do this? i have a prg/dll, but then i don't know how to determind the folder name for the program using WIN32API...Can anyone help me ?
>
If you're using the Windows Scripting Host automation object, the Wscript.Shell object has a SpecialFolders collection that will give you the information; for example:
oWSH = CREATEOBJ('Wscript.Shell')
? oWsh.SpecialFolders.item('Desktop')
If you're using George Tasker's LNKFILES.DLL to handle the generation of the shortcut, he provides an entrypoint to return selected elements of the SpecialFolders collection in his .DLL; see the documentation for his .DLL. If you're using some other .DLL (the very incomplete implementation from the older article in FoxPro Advisor, for example) you'll need to either write some API code to find it, or explore the registry; there's a Desktop entry for the current user somewhere under the HKEY_CURRENT_USER key in the registry.
My preference is to use the automation object approach because of all the functionality associated with the WSH; George's .DLL is probably the easiest and best approach where you don't want to make installation of the Scripting Host a part of the requirements for your application.