Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Read error from Run command
Message
From
12/11/2002 19:00:15
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00721753
Message ID:
00721904
Views:
11
>You might also want to check out:
>http://support.microsoft.com/default.aspx?scid=kb;EN-US;q191584
>HOWTO: Determine When a 32-bit Process has Completed from VFP
>Many people have found it to be helpful.

API_APPRUN exposes the termination code as in the example from the MSKB entry; you just need to call the CheckProcessExitCode method to do so; it will return the termination code for a successfully launched app, or 259 for one that is still running.

>>Is there a way to launch a DOS command and read any resulting error conditions?
>>
>>I'm using the lpr command to send a pre-existing file to a printer. I'd like to verify the command properly functioned before marking the file as sent. If the command is executed from the DOS command window on a file that has a lock on it, or is not present, or whatever; then an error message is printed. I'd like to react to that error message.
>>
>>I've tried using the app_apirun class, but it responds with success no matter if the file exists or not.
>>
>>Thanks
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