I am working on a c++ program that is supposed to launch internet explorer and display a local html file on Windows 7. I am trying to use ShellExecute, but it doesn't work. I googled around, but could not find an answer that worked. Here is the code:
ShellExecute(NULL, "open", "start iexplore %userprofile%\\Desktop\\html_files\\file.hml", NULL, NULL, SW_SHOWDEFAULT);
I copied the command into a system() call just to see if it would work, and it did. Here is the system() call I tried:
system("start iexplore %userprofile%\\Desktop\\html_files\\file.html");
Since the system call worked, its clearly a problem with ShellExecute. Basically, Internet Explorer does not come up. Everything compiles correctly, though. Any ideas?