Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using shellexecute in .prg file.. Shell Execute Can't Fi
Message
 
To
23/10/2004 21:26:44
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP3
Miscellaneous
Thread ID:
00954044
Message ID:
00954051
Views:
14
prior to launching the program in shellexecute, try creating a dummy file. Launch your program via shellexecute and as one of the last steps of that program, delete the file.

Vfp can then check for the existance of the file and loop until it is deleted.


John



>Running into a problem that I cannot find a solution for. In order to run a particular executable from a .prg file over a network without mapping a drive letter (using a UNC path), I need to run the program file from shellexecute. No problem there. The problem comes from the fact the Visual FoxPro wants to just keep going before the program shellexecute started finishes. I need a way to allow the program (pkzip) to complete without the user having to hit a key (required with the wait command.)
>
>Question... Is there a way to allow the shellexecute command to finish before the .prg file continues? Without having to use WAIT?
>
>=============
>
>DECLARE ShellExecute IN shell32.dll ;
>Integer, String, String, String, String, Integer
>
>ShellExecute(0,"open","pkzip25","-ext -dir -over=all update","",1)
>
>*** PROBLEM AREA ***
>
>syscountry = 1
>DO update1
>
>DELETE FILE UPDATE.ZIP
>DELETE FILE *.BAK
>DELETE FILE *.TBK
>CLEAR
>RETURN
>
>=============
>
>Thank you in advance!
>
>Jack Wilson
John Harvey
Shelbynet.com

"I'm addicted to placebos. I could quit, but it wouldn't matter." Stephen Wright
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform