64,636
社区成员
发帖
与我相关
我的任务
分享
检测VC++运行库
tstring System32Path = _T("C:\\Windows\\System32\\");
tstring msvcrp100 = System32Path + _T("msvcp100.dll");
tstring msvcr100 = System32Path + _T("msvcr100.dll");
bool rt = true;
if(!::PathFileExists(msvcrp100.c_str())){
rt = false;
}
if(!::PathFileExists(msvcr100.c_str())){
rt = false;
}
if(!rt){
std::cout<<"正在安装VC++ 2010 X86"<<std::endl;
tstring VC_X86Path = m_strProgramsPath + _T("\\vcredist_x86.exe");
ShellExecute(VC_X86Path.c_str(),_T("open"),SW_SHOW);
}