Link to home
Start Free TrialLog in
Avatar of s_syed
s_syed

asked on

Execute a Application from a C program

HI

I have a requirement of executing a internet explorer from a C program with a BMP name as parameter.
can you please let me know the function call to do that.

Thanks

SOLUTION
Avatar of sunnycoder
sunnycoder
Flag of India 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 s_syed
s_syed

ASKER

#include <iostream.h>
#include <stdio.h>
#include <stdlib.h>
char command[] = "L:\\program files\\Internet Explorer\\iexplore.exe x:\\paradise.jpg";
int main()
{
      cout << "Inside main" << endl;
      
      system(command);
      return 0;
}

i tried like that and got an error as

Inside main
'L:\program' is not recognized as an internal or external command,
operable program or batch file.
Press any key to continue

ASKER CERTIFIED SOLUTION
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
or else u cud use

char command[]="C:\\PROGRA~1\\INTERN~1\\IEXPLORE.EXE C:\\test.jpg";

shud work as fine.