Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Weird Problem
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00198756
Message ID:
00198818
Views:
18
>Ed,
>One more question while I have your atention, Where is the FAQ section that you refer to? Is it in UT or another site??
>

Look in the FAQ here on UT; there's an example of how it gets used in there. You can look at the sames in the ZIP file to see how it gets used. The following is the code from procexam.prg, which shows its use:
SET CLASSLIB TO Process
oProcess = CREATEOBJ('API_AppRun','NOTEPAD.EXE AUTOEXEC.BAT','C:\','NOR')
*Run the application and don't wait to terminate
*  parms are the command line, the directory to run from, and the Window state
oProcess.LaunchApp()
*Check the exit status;  259 means still running
IF oProcess.CheckProcessExitCode() = 259
	wait window 'Still running'
ELSE
	wait window 'Terminated with a '+alltrim(str(oProcess.CheckProcessExitCode()))
ENDIF
? oProcess.KillProc()
oProcess = ''
*  You can have multiple processes running at once
oProcess1 = CREATEOBJ('API_AppRun','REGEDIT','C:\','NOR')
oProcess2 = CREATEOBJ('API_AppRun','NET USE /? | MORE')
oProcess1.LaunchApp()
oProcess2.LaunchApp()
oProcess1 = ''
oProcess2 = ''
* Run them both and wait on the last to terminate
oProcess1 = CREATEOBJ('API_AppRun','NOTEPAD.EXE AUTOEXEC.BA','C:\','NOR')
oProcess2 = CREATEOBJ('API_AppRun','NOTEPAD.EXE CONFIG.SY','C:\','MIN')
oProcess1.LaunchApp()
oProcess2.LaunchAppAndWait()
You can run batch files as well as .EXE and .COM files with no problem.
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
Next
Reply
Map
View

Click here to load this message in the networking platform