if NOT( "PROCESS") $ SET("CLASSLIB") SET classlib TO Process ADDITIVE endif * Set up the WinZip command line to extract file. Parameters are: * -e = extract * -o = overwrite files * -j = junk pathnames (i.e., don't use pathnames in zip file, if any) * -s = password (case sensitive) lcWinZipCommandLine = ALLTRIM( lcWinZipLoc) + ; " -e -o -j -sMyPassword " + ; "MyZipFile.zip " + "MyTargetPath" * Use Ed Rauh's API_AppRun to launch WinZip and wait for completion, * then check the termination code to see if we succeeded. oProcess = CREATEOBJ( ; "API_AppRun", ; lcWinZipCommandLine, ; "", ; "NOR" ; ) *Run the application wait window nowait "Unzipping files..." oProcess.LaunchAppAndWait() * Show termination status wait clear lnStatus = oProcess.CheckProcessExitCode() oProcess = .NULL. release classlib process if lnStatus = 0 && normal termination RETURN .T. else && abnormal termination messagebox( "Error code " + ALLTRIM( STR( lnStatus)) + ; ". The file could not be unzipped.", ; MB_ICONEXCLAMATION, "Error") RETURN .F. endif