How can I use this funtion to execute file with *.lnk extention, Kindly i want to execute the shortcut in sendto directory.
Printable View
How can I use this funtion to execute file with *.lnk extention, Kindly i want to execute the shortcut in sendto directory.
If I wanted to run 'notepad.exe' using WinExec() I would use
const char cmdLine[]="\\windows\\notepad.exe";
UINT result = WinExec(cmdLine, SW_SHOW);
if (result<32)
{
// handle error
}
I don't know whether the *.lnk extension effects the use of the WinExec() command. Try using cmdLine[]="\\yourfile.lnk";