Here's the scenario:
OS: Windows XP
program.exe is in C:\foobar
program.exe creates foobar.html and puts it in C:\foobar
Here's the question:
How can I open foobar.html with Internet Explorer using the system() function? Thanks.
Here's the scenario:
OS: Windows XP
program.exe is in C:\foobar
program.exe creates foobar.html and puts it in C:\foobar
Here's the question:
How can I open foobar.html with Internet Explorer using the system() function? Thanks.
Try it in "cmd" or "command" *first*
now
"start c:\Progra~1\Intern~1\ie.exe pathtohtmlfile"
stdlib.h:system("start c:\Progra~1\Intern~1\ie.exe pathtohtmlfile");
(this should work, old msdos tricks )
NOTE: I haven't had a windows computer in front of me for about 8 months, so don't count on it exactly
The problem with this would be that there is no guarantee that Internet Explorer will be at the path I've given, so you'd need to start using Windows API calls to find it or its equivalent, such as Firefox.Code:system("\"c:\\program files\\internet explorer\\iexplore.exe\" C:\\foobar\\foobar.html");
oh yea, forgot about that escaping problem, ha.
I think your better off using "C:/program files/style path"
you might try using either a relative path (\\program files\\blah...) or getenv() systemdrive
FAQ: http://faq.cprogramming.com/cgi-bin/...&id=1043284392
(contains shellexecute example)
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]