Solved

Delphi application calling other executables

Posted on 1998-10-05
2
200 Views
Last Modified: 2010-04-06
How do I call an external executable from a Delphi application?  In BP 6.0 it was

    Exec ('filename.exe', 'Parameters')

What is it under D3?
0
Comment
Question by:dejohn99
2 Comments
 

Accepted Solution

by:
qingang earned 50 total points
Comment Utility
use the ExecuteFile function comes with delphi in FMXUtils unit
0
 
LVL 1

Expert Comment

by:Asw
Comment Utility
Hidejohn99

Give this a shot.

To execute a standard program, simply use:

WinExec('C:\WINDOWS\NOTEPAD.EXE', SW_SHOWNORMAL);

To add a command line, use:

WinExec('C:\WINDOWS\NOTEPAD.EXE C:\WINDOWS\WIN.INI', SW_SHOWNORMAL);

To pop up a DOS box, use:

WinExec('COMMAND.COM', SW_SHOWNORMAL);

To execute a DOS command, use:

WinExec('COMMAND.COM /C DIR *.*', SW_SHOWNORMAL);
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now