>Yes, the user can double click on the file and it launches fine. Also they can run it with windows run.
There's no reason to pass parameters by reference to ShellExecute. when you do, you've to add CHR(0) to the end of each string. VFP takes care of that when you pass parameters by value. Also try to use default action instead of 'open'.
DECLARE INTEGER ShellExecute IN shell32;
INTEGER hwnd, STRING lpOperation,STRING lpFile, ;
STRING lpParameters, STRING lpDirectory, INTEGER nShowCmd
...
lcop = ""
...
lnresult = ShellExecute(0, lcop, lcFilename, lcparms, lcpath, lnWindowState)
...
--sb--