About Store Forum Documentation Contact



Post Reply 
How run other application from EE application
Author Message
Harton Offline
Member

Post: #1
How run other application from EE application
How run other application from EE application. I have only path to *.exe file and I want run this 'exe' and check exit code which return. How can I do this?
07-29-2011 06:19 PM
Visit this user's website Find all posts by this user Quote this message in a reply
yvanvds Offline
Member

Post: #2
RE: How run other application from EE application
I don't know if it's the best method, but I did it with this:

PHP Code:
#define NOMINMAX
#include <windows.h>
#include <stdlib.h>

#include "stdafx.h"

// add this code somewhere:
STARTUPINFO si;
PROCESS_INFORMATION pi;

ZeroMemory(&sisizeof(si));
si.cb sizeof(si);
ZeroMemory(&pisizeof(pi));
CreateProcess("yourprogram.exe"NULLNULLNULLFALSE0NULLNULL, &si, &pi); 

You might want to look at what the arguments do for more flexible use. Also i wrote this half a year ago, so perhaps EE has some native functions to do this now.

Regards,

yvan
07-29-2011 06:39 PM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #3
RE: How run other application from EE application
The function OSLaunch allows you to launch a program, but I don't think you can get the exit code this way...
07-29-2011 06:49 PM
Find all posts by this user Quote this message in a reply
Post Reply