Board index » delphi » How to run a DOS application in Delphi 2

How to run a DOS application in Delphi 2

how do i run a DOS application inside my Delphi program ?

thank u....

 

Re:How to run a DOS application in Delphi 2


Hi yann,

Quote
>how do i run a DOS application inside my Delphi program ?

I have a written a component (TExecutor) that will do the trick.

Below you find an example of how to use it:

with yourExecutor do
begin
  FileName='c:\windows\yourexefile.exe';
  Visibility:=HIDE; // run in the background
  Wait:=True;
// or "Wait:=false" if you don't want to wait until your "background" app.
has finished.
  Execute;
end;

The TExecutor component launches an application associated with
the extension you provided in LaunchType. It will also run .exe files.

You can download it at:

http://www.high-logic.com/delphi.html

Good luck,

Erwin Denissen at
http://www.high-logic.com/

** providing shareware components with source **

Re:How to run a DOS application in Delphi 2


Check this URL:
http://members.aye.net/~bstowers/delphi/examples/execandwait.html

Good luck,
Sergey

Quote
yann wrote in message <01be15ec$fd00b620$LocalHost@alanteo>...
>how do i run a DOS application inside my Delphi program ?

>thank u....

Re:How to run a DOS application in Delphi 2


Quote
yann wrote:
> how do i run a DOS application inside my Delphi program ?

You can use ShellExecuteEx togehter with GetExitCodeProcess
if the rest of the application should wait for the DOS
program to complete.

Idar Tollefsen

Other Threads