#include <iostream.h>
#include <windows.h>
int main() {
WinExec("E:\\QQMusic\\QQMusic.exe",SW_SHOW);
return 0;
}
#include <windows.h >
#include <iostream.h >
void main(int argc,char *argv[])
{
cout < <”Opening with WinExec\n”;
if (WinExec(“notepad readme.txt”,SH_SHOW) <32)
MessagBox(NULL,”Can’t WinExec”,NULL,MB_OK);
cout < <”Press Enter\n”;
MessagBox(NULL,”Press OK to continue”,”Progrm Launched”,MB_OK);
cout < <”Opening with ShellExecute\n”;
if (ShellExecute (NULL,”open”,”readme.txt”,NULL,NULL,SW_SHOW) <(HANDLE) 32)
MessagBox(NULL,”Can’t ShellExecute\n”,NULL,MB_OK);
}