QString rootDir1 = QApplication::applicationDirPath();
 QString filePathExe1 = QString(“%1/run/xxx.exe”).arg(rootDir1);
 QString fileConfigPath1 = QString(“%1/run/”).arg(rootDir1);
 std::string stdStr = filePathExe1.toStdString();
 LPCSTR lpcStr = stdStr.c_str();
 std::string stdStrConfig = fileConfigPath1.toStdString();
 LPCSTR lpcStrConfig = stdStrConfig.c_str();
 //执行ffprobe命令并且保存内容至文件中。
 SHELLEXECUTEINFO ShExecInfo = { 0 };
 ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
 ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
 ShExecInfo.hwnd = NULL;
 ShExecInfo.lpVerb = NULL;
 ShExecInfo.lpFile = lpcStr;
 ShExecInfo.lpParameters = lpcStrConfig;
 ShExecInfo.lpDirectory = lpcStrConfig;
 ShExecInfo.nShow = SW_SHOW;
 ShExecInfo.hInstApp = NULL;
if (ShellExecuteEx(&ShExecInfo))
{// 成功执行WaitForSingleObject(ShExecInfo.hProcess, INFINITE);DWORD dwExitCode;if (GetExitCodeProcess(ShExecInfo.hProcess, &dwExitCode)){// 可以获取程序退出码}CloseHandle(ShExecInfo.hProcess);
}
else
{// 执行失败
}
return;