Link to home
Start Free TrialLog in
Avatar of newstandard
newstandard

asked on

start a process and wait for finish

i have an exe that i want to start from my program, and then i want my program to pause and do something after the external exe is closed.  what is the best way to do this?

thanks,

justin
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of newstandard
newstandard

ASKER

thank you i will try that shortly
Good work jkr
it works when i do "notepad.exe"

however, when I do "c:\myFileToRun.exe" it doesn't work.  is there any reason you know of why this would be true?

justin
>>is there any reason you know of why this would be true?

You'd use

ExecuteAndWaitForCompletion ( "c:\\myFileToRun.exe");

You need a double backslash, as a single one serves as the escape character.
:: slaps forehead ::