Solved

Running an exe file

Posted on 2000-02-19
5
168 Views
Last Modified: 2010-04-04
I know how to do this with vb, but I'm new to delphi.  How do I run an application.  Also knowing how to open the defualt browser or mail program would be nice, but my question is about running an app.

In vb it would be:
Dim X
X = shell(c:\myapp.exe, vbhide)

I hope it's that simple in delphi.
0
Comment
Question by:fibdev
  • 3
  • 2
5 Comments
 
LVL 3

Author Comment

by:fibdev
ID: 2538587
ooops:
X = shell("c:\myapp.exe", vbhide)

Didn't want vb programmers correcting me :)
0
 
LVL 1

Accepted Solution

by:
fulvio_brasil earned 50 total points
ID: 2538605
To run a simple app you can use:
WinExec("c:\myapp.exe", SW_HIDE)

To open a browse, e-mail, app for an extension, you can use:

ShellExecute(Handle,'open',pchar('http://www.experts-exchange.com'),'','',SW_SHOW);

I hope that it can help you,

Fulvio.
0
 
LVL 1

Expert Comment

by:fulvio_brasil
ID: 2538613
Please, pay attention:

The ShellExecute's 4 and 5 parameters are (I don't know the right english name, but) single quotes (like every string in Delphi), not (like in VB) double quotes.

And, to use this function, you need put 'ShellAPI' in your uses clause.
0
 
LVL 3

Author Comment

by:fibdev
ID: 2538643
I have not tested it, but I'll trust your answer.

Your english is correct, very good.

Thank you.
0
 
LVL 1

Expert Comment

by:fulvio_brasil
ID: 2538670
Thanks
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

808 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