Spawning executables

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Spawning executables

Bill Schwab-2
Hello all,

What is the approved way to fire off a command-line tool and wait for
output?  With the caveat that I am still working in a kludged 5.02 image
(another run at 5.1 will happen soon, really<g>), #system: is deprecated,
and #spawnForOutput: is marked private.  The latter also didn't work
terribly well for me, but that's probably my fault.

I have two projects in mind.  First is something to run InnoSetup's command
line compiler on a batch of setups (ideally getting hints from
SuiteBuilder), and present the aggregate output to the user for inspection.

The second would wrap the main OpenSSL executable to simplify some routine
tasks.  Ideally, I'd like to embed a console window in a wizard interface -
any chance of that??  Failing that, it would be a help to simply open a
console and run it with the correct arguments; a wizard would do that a few
times with different arguments.

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Spawning executables

Pieter Emmelot-2
Bill,
See ExternalProcess class by Robert Jarvis.
Depending on the exe you may need to run it inside a command shell to get
stdout/stderr.
For example:  'cmd.exe /c YOUREXE'

Regards,

Pieter

"Bill Schwab" <[hidden email]> wrote in message
news:ba3usj$pdbup$[hidden email]...
| Hello all,
|
| What is the approved way to fire off a command-line tool and wait for
| output?  With the caveat that I am still working in a kludged 5.02 image
| (another run at 5.1 will happen soon, really<g>), #system: is deprecated,
| and #spawnForOutput: is marked private.  The latter also didn't work
| terribly well for me, but that's probably my fault.
|
| I have two projects in mind.  First is something to run InnoSetup's
command
| line compiler on a batch of setups (ideally getting hints from
| SuiteBuilder), and present the aggregate output to the user for
inspection.
|
| The second would wrap the main OpenSSL executable to simplify some routine
| tasks.  Ideally, I'd like to embed a console window in a wizard
interface -
| any chance of that??  Failing that, it would be a help to simply open a
| console and run it with the correct arguments; a wizard would do that a
few
| times with different arguments.
|
| Have a good one,
|
| Bill
|
| --
| Wilhelm K. Schwab, Ph.D.
| [hidden email]
|
|
|