• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 150
  • Last Modified:

Code for starting a exe file from another

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
samone
Asked:
samone
  • 3
  • 2
1 Solution
 
TulipCommented:
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
 
viktornetCommented:
Didn't you just copy and paste that code from the question i answered a little while ago?? or maybe not??

-Viktor
--Ivanov
0
 
TulipCommented:
No I didn't Viktor.
That command is so common, that not only you know it !


0
 
TulipCommented:
No I didn't Viktor.
That command is so basic, that not only you know it !


0
 
viktornetCommented:
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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