Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Run a DOS aplication
Message
From
26/07/1999 20:29:10
 
 
To
26/07/1999 16:15:52
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00246074
Message ID:
00246391
Views:
14
>Hey Ed,
>
>Just a quick question, I'm just curious ...
>
>>You'll need to create a .PIF file for the batch file, that specifies Close After Exit, and then execute the batch file using something like the FFC ShellExecute class (uses the ShellExecute() API call) or my API_APPRUN class (uses Createprocess()) rather than RUN.
>
>What exactly is the difference between the two?
>

A lot, mostly involving what can be run (CreateProcess() can run an executable of any sort, ShellExecute() can run an executable or launch a document with it's registry-specified application associated with a command verb like 'Open' or 'Print'), how much you cna view an control the executable (CreateProcess() returns both a ProcessID and a Process handle, which lets you do lots of things), and what things you can control at launch (there are two structures in CreateProcess() that can control an amazing variety of things like DOS environments, shared handles and the like, not available to ShellExecute()).

For what most people are doing, unless waiting on temrination is a major issue, theu can both be used. If you need to get a return code or monitor the run status, you need either CreateProcess(), or ShellExecuteEx(), a ShellExecute() on steroids. When it boils down to it, ultimately, everything relies on CreateProcess() to spawn a child process.

>-Bonnie
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