Solved

Delphi application calling other executables

Posted on 1998-10-05
2
205 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Accepted Solution

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

Expert Comment

by:Asw
ID: 1341813
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

734 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