Is it possible to make code that will open up microsoft office word? (And when I mean open, I mean it will be the same as clicking on it. Without clicking on it...) Seems a bit pointless, but I really want to know! And if it is possible, then how???
ShellExecute requires you pass it a LPCWSTR*, while you're passing it a C literal string.
In order for that to compile properly, you can either use ShellExecuteA (which will accept that as a parameter) instead, or do this:
1 2 3 4
constwchar_t *path = L"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs" //notice the L prefix
"\\Microsoft Office\\Microsoft Office Word 2007.lnk";
ShellExecute(NULL, NULL, path, NULL, NULL, SW_SHOWNORMAL);