Solved

Code for starting a exe file from another

Posted on 1998-12-22
5
137 Views
Last Modified: 2010-04-06
How do i do to start programs from my form.
I want to select a file with the fileopendialog and save it in the register.
start the new program and close the program where i initiated the startcommand.
0
Comment
Question by:samone
  • 3
  • 2
5 Comments
 

Accepted Solution

by:
Tulip earned 100 total points
ID: 1352582
Let's say you want to start the file "D:\example.exe"
Then this command should work:

ShellExecute(0, 'open', 'D:\example.exe', nil, nil, SW_SHOWNORMAL);

if you want to close the first app, just use the CLOSE command
after ShellExecute.
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1352583
Didn't you just copy and paste that code from the question i answered a little while ago?? or maybe not??

-Viktor
--Ivanov
0
 

Expert Comment

by:Tulip
ID: 1352584
No I didn't Viktor.
That command is so common, that not only you know it !


0
 

Expert Comment

by:Tulip
ID: 1352585
No I didn't Viktor.
That command is so basic, that not only you know it !


0
 
LVL 10

Expert Comment

by:viktornet
ID: 1352586
Sorry, I said or maybe not which means I wasn't sure and just asked u.... Anyway, Merry Christmas to all...

-Viktor
--Ivanov
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Thread safe  opinion 7 126
Best Firemonkey component pack 1 87
Can Viruses spread while transferring Binary data with Winsock 2 66
SUM 2 INTEGER ARRAYS INTO 1 10 93
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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

910 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

21 Experts available now in Live!

Get 1:1 Help Now