if (PathFileExists(path))
{
CString tempStr;
tempStr.Format("shell32.dll,OpenAs_RunDLL %s",path);
int isError=(int)ShellExecute(NULL, "open", "rundll32.exe ", tempStr, "", SW_SHOW);
if (isError<32)
{
MessageBox("相應文件打開失敗","提示");
}
}
else
{
MessageBox("文件路徑有誤!");
}