PDA

View Full Version : WinExec failed: return=87 Error



Gary Steward
06-29-2004, 10:46 AM
I am trying to run a self-extracting setup that I recieved from a vendor. I have the following code...

function OnEnd()
string szProgram, szCmdLine;
number nOptions;

begin
szProgram = TARGETDIR + "\\Install_1_Wire_Drivers_v320.exe";
szCmdLine = "";
nOptions = LAAW_OPTION_NOWAIT;
LaunchAppAndWait ( szProgram, szCmdLine, nOptions );
end;

It starts to extract the file but at 99%, the error pops up. I have the file being copied into the target directory. If I go to the target directory after it has failed, and double-click the file, it runs fine (so I don't think it is the setup file itself).

Can anyone give me a clue as to why this is happen and/or how to correct it?