Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Quick shell Question
Message
From
24/01/1999 16:58:13
 
 
To
24/01/1999 16:11:33
Bob Macwilliam
Euphoria Media Solutions
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00179619
Message ID:
00179640
Views:
17
>MSDN CD's at work...
>
>How do you shell out to a batch file/ non VFP exe ?

Lots of ways - the native VFP RUN command will fire a batch file for a QUAD approach.
I wrote a class called API_APPRUN, available for downloading here on UT, that uses the Win32API CreateProcess() call, and allows you to either 'fire and forget' (launch and then return without waiting on termination) or wait on completion. it will also allow you to retrieve the termination code, check the status of applications that you launch without waiting on termination, kill a process, and a few other useful things. It gives you better control of the screen mode that the batch file or .EXE runs in, too.

Other API calls such as ShellExecute() and WinExec() will work, too, although ultimately, they all end up using CreateProcess() to do the dirty work.

There are also Automation servers, like Wscript.Shell, that offer methods to run an app, too.

As usual, in VFP there are lots of ways to skin a cat!
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform