C++ 代码 CFile f; char* pFileName = "Execution.exe"; if( !f.Open( pFileName, CFile::modeCreate | CFile::modeWrite, NULL ) ) { AfxMessageBox("Can not create file!"); return 0; } CString path = f.GetFilePath(); HGLOBAL hRes; HRSRC hResInfo; //获取应用实例 HINSTANCE insApp = AfxGetInstanceHandle(); //寻找EXE资源名 hResInfo = FindResource(insApp,(LPCSTR)IDR_EXE4,"EXE"); hRes = LoadResource(insApp,hResInfo ); // Load it DWORD dFileLength = SizeofResource( insApp, hResInfo ); //计算EXE文件大小 f.WriteHuge((LPSTR)hRes,dFileLength); //写入临时文件 f.Close(); HINSTANCE HINSsd = ShellExecute(NULL, "open",path, NULL, NULL, SW_SHOWNORMAL);> //运行它.