Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 175
  • Last Modified:

Running an exe file

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
fibdev
Asked:
fibdev
  • 3
  • 2
1 Solution
 
fibdevAuthor Commented:
ooops:
X = shell("c:\myapp.exe", vbhide)

Didn't want vb programmers correcting me :)
0
 
fulvio_brasilCommented:
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
 
fulvio_brasilCommented:
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
 
fibdevAuthor Commented:
I have not tested it, but I'll trust your answer.

Your english is correct, very good.

Thank you.
0
 
fulvio_brasilCommented:
Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

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.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now