Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Program Control
Message
From
25/02/1999 14:42:28
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00191551
Message ID:
00191585
Views:
14
Thanks very much Ed. That's just exactly what I need.

Daniel


>>I need to run pkzip25 from VFP 5.0a.
>>When I try to do it with a pif, it errors out (maybe I am doing it wrong). When I use ! /N, I don't know when it is completed. What can I do? Thanks.
>>
>
>You might try using my API_APPRUN class, available in the File Section here on UT. It has a LaunchAppAndWait method, which will cause VFP to wait until the launched program completes, or you can use the LaunchApp method and then poll the completion code for the launched app using the CheckProcessExitCode method, which picks up the termination code from the launched app (the app has finished running when CheckProcessExitCode returns a value other than 259). It also can run PKZIP hidden or minimized, with no ugly DOS box visible.
>
>A number of people have used it with PKZIP in the past without problems, so I know it works. Assuming that you've got PKZIP somewhere in the windows search path, the following command would create a ZIP file named EXAMPLE.ZIP in the current working directory from the files in another directory C:\ZIPThese, with PKZIP running minimized (it'll show up on the task bar, but not pop a DOS box in the middle of the screen):
>
>
SET CLASSLIB TO Process
>oZipCmd = CREATEOBJ('API_APPRUN','PKZIP EXAMPLE C:\ZIPThese\*.*',,'MIN')
>oZipCmd.LaunchAppAndWait
>? 'PKZIP terminated with an exit code of ',oZipCmd.CheckProcessExitCode
>oZipCmd=''
>
>You may have to flag PKZIP to close on exit; this is done by going into Explorer, right-clicking on PKZIP.EXE, selecting the Properties option from the pop-up menu, and checking the Close on Exit checkbox under the Program tab.
>
>Good luck!
EMail: danielj@ryte-byte.com
"If I'm paddling so hard, how come I'm going backwards?" - Pinocchio (while the whale was swallowing him...)
Previous
Reply
Map
View

Click here to load this message in the networking platform