calling and execution other programs - page 2

 
  1. Don't install in \program files* on Vista/Win7
  2. no "system(program.exe)" or "call(program.exe)" - like command
    System is a start function, it does not wait for the command to finish. You can simulate that
    #include <WinUser32.mqh>
     bool Shell(string file, string parameters=""){
        #define DEFDIRECTORY NULL
        #define OPERATION "open"    // or print
        #define SW_SHOWNORMAL       1
        int r=ShellExecuteA(0, OPERATION, file, parameters, DEFDIRECTORY, SW_SHOWNORMAL);
        if (r <= 32){   Alert("Shell failed: ", r); return(false);  }
        return(true);
    }
    
    Programmatically renaming files...any way to do it with ShellExecuteA? - MQL4 forum
  3. Since there is no call and wait, if you use files than you have to do test for done with timeout, like 7bit posted. If you use anonymous pipes, named pipes or quick channel it's implicit.
Reason: