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;
}
|
本文转自Work Hard Work Smart博客园博客,原文链接:http://www.cnblogs.com/linlf03/archive/2011/11/19/2255548.html,如需转载请自行联系原作者