View Complete Thread | FoxWeb Forum Home
Search:
Date:    Msg ID:   
From:    Thread:   
Subject:   
Hello all,
 I developed my application in Visual FoxPro 6.0.  I want it to use shellexecute to run "winzip32.exe" and wait until "winzip32.exe" finishes its job before the application continue processing.  Here's my code...
 
Function Unzip
PARAMETERS m.FILENAME,m.DESTDIR
LOCAL LNRETVAL, LCOPERATION
LCOPERATION = "Open"
   DECLARE INTEGER ShellExecute IN SHELL32.DLL ;
        INTEGER handle,;
        STRING @sFile,;
        STRING @lp,;
        STRING @DIR,;
        STRING @dir1,;
        INTEGER ncmd
    LNRETVAL = SHELLEXECUTE(0, LCOPERATION, "Winzip",;
        " -e "+m.FILENAME+" "+m.DESTDIR, "", 1)
 RETURN .F.
 
This code is working but my FoxPro App. doesn't stop and wait for WinZip to finish its job.
 
Please help,
 
Sam