tpresenza
asked on
Execute program from visual c program
I have developed a visual c ++ program as a standard .exe and I need to have it execute/run another program that is a standard .exe. I am having problems finding the correct code to accomplish this.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
btw, you can also use _spawn
Here's an example of using ShellExecute to call the external application "regsvr32.exe" and pass it a parameter of "tip.dll"...
::ShellExecute(NULL, NULL, _T("regsvr32.exe"), _T("tip.dll"), NULL, SW_SHOW);
::ShellExecute(NULL, NULL, _T("regsvr32.exe"), _T("tip.dll"), NULL, SW_SHOW);
Here's how to use _spawnl....
spawnl(_P_NOWAIT,"C:\\Prog ram Files\\Plus!\\Microsoft Internet\\IEXPLORE.EXE",NU LL);
and the last method you can use is WinExec... but that has been deprecated.
spawnl(_P_NOWAIT,"C:\\Prog
and the last method you can use is WinExec... but that has been deprecated.
ASKER
Aaron,
Thanks. I'll give it a try.
tpresenza
Thanks. I'll give it a try.
tpresenza