C++ 打开exe文件的方法(VS2008)
#include "stdafx.h"
#include <Windows.h>
#include <ShellAPI.h>
int _tmain(int argc, _TCHAR* argv[])
{
SHELLEXECUTEINFO shell = { sizeof(shell) };
shell.fMask = SEE_MASK_FLAG_DDEWAIT;
shell.lpVerb = L"open";
shell.lpFile = L"C:\\windows\\NOTEPAD.EXE";
shell.nShow = SW_SHOWNORMAL;
BOOL ret = ShellExecuteEx(&shell);
return 0;
}