Board index » delphi » Difficult Problem!

Difficult Problem!

Does anyone know, how I can start a DOS-program, in a delphi
2.0-application? I want to start a command-line-program with
delphi, but I see no solution for this problem.

Any ideas?
Please mail me. csitis...@aon.at

 

Re:Difficult Problem!


hi!

i haven't tested it now and used the command a long time ago, but i
could be possible that it works!

try:
  WinExec('dosprogram.com',SW_SHOWNORMAL);
or:
  WinExec('command.com /c dosprogram.com',SW_SHOWNORMAL);

bye!
    be@

--
 ///   beat Schwarzentrub, Hbelweg 30, CH-4222 Zwingen
[|]  Email: bea...@gmx.net oder schwarzent...@bluewin.ch
 \-/   Internet: http://beat-schwarzentrub.home.ml.org

Re:Difficult Problem!


  CreateProcess or ShellExecute...  If you need an example (like you sound like
you're going to) E-mail me...

--
Jason Wallace
SL Software
Dark...@SLSoftware.reno.nv.us
--
"We are Microsoft.  You will be assimilated.  Resistance is Futile."
--

Quote
Michael Csitkovics wrote in message <3631CB85.C5B09...@aon.at>...
>Does anyone know, how I can start a DOS-program, in a delphi
>2.0-application? I want to start a command-line-program with
>delphi, but I see no solution for this problem.

>Any ideas?
>Please mail me. csitis...@aon.at

Re:Difficult Problem!


  Shouldn't use WinExec as it goes away soon...  --  CreateProcess or
ShellExecute...

--
Jason Wallace
SL Software
Dark...@SLSoftware.reno.nv.us
--
"We are Microsoft.  You will be assimilated.  Resistance is Futile."
--

Quote
beat Schwarzentrub wrote in message <3631EAA3.66489...@gmx.net>...
>hi!

>i haven't tested it now and used the command a long time ago, but i
>could be possible that it works!

>try:
>  WinExec('dosprogram.com',SW_SHOWNORMAL);
>or:
>  WinExec('command.com /c dosprogram.com',SW_SHOWNORMAL);

>bye!
>    be@

>--
> ///   beat Schwarzentrub, Hbelweg 30, CH-4222 Zwingen
>[|]  Email: bea...@gmx.net oder schwarzent...@bluewin.ch
> \-/   Internet: http://beat-schwarzentrub.home.ml.org

Re:Difficult Problem!


Quote
> Shouldn't use WinExec as it goes away soon...  --
> CreateProcess or ShellExecute...

yes i now, but i like winexec 'cause i used it in borland pascal and it
seems me more easier.

--
 ///   beat Schwarzentrub, Hbelweg 30, CH-4222 Zwingen
[|]  Email: bea...@gmx.net oder schwarzent...@bluewin.ch
 \-/   Internet: http://beat-schwarzentrub.home.ml.org

Re:Difficult Problem!


You can also use the FMXUtils (that come with Delphi) ExecuteFile. It's
much simpler.

Quote
Michael Csitkovics wrote:
> Does anyone know, how I can start a DOS-program, in a delphi
> 2.0-application? I want to start a command-line-program with
> delphi, but I see no solution for this problem.

> Any ideas?
> Please mail me. csitis...@aon.at

--
Regards!

================================
Jernej Logar
email:jernej.lo...@kss-loka.si
================================

Re:Difficult Problem!


Quote
>> Shouldn't use WinExec as it goes away soon...  --
>> CreateProcess or ShellExecute...
>yes i now, but i like winexec 'cause i used it in borland pascal and it
>seems me more easier.

Don't count on that. WinExec is now implemented only as a wrapper to
CreateProcess anyway. As such, they will probably just keep it into all new
versions of NT. They don't dare to delete WinExec - too many applications
are using it.

But, yes, CreateProcess is a Right Thing and gives you much more flexibility
than WinExec.

Primoz

Other Threads