1. You are using ANSI strings. You MUST use CreateProcessA.
2. If CreateProcessA() returns FALSE you can then call GetLastError() and FormatMessage() to find out why it failed.
Thanks webJose. I found that I needed double slashes for it to work:
C:\\Program Files\\Internet Explorer\\iexplore.exe
instead of single slashes
C:\Program Files\Internet Explorer\iexplore.exe
In C++, the backslash is the escape character. It is used to insert non-printable characters in string literals, such as the carriage return or the line feed characters. Therefore, you cannot insert a single backslash into a string literal by simply using a single backslash, ergo the two backslashes that become one.