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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_crt_system.2c_._wsystem.asp
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
#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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
or else u cud use
char command[]="C:\\PROGRA~1\\I NTERN~1\\I EXPLORE.EX E C:\\test.jpg";
shud work as fine.
char command[]="C:\\PROGRA~1\\I
shud work as fine.