?
Solved

Running an exe file

Posted on 2000-02-19
5
Medium Priority
?
171 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
[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
  • 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 200 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

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…
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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

801 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