1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| void Check_for_VCRedistributive()
{
//Frage: Check for VC++ Redistributive
int result;
HKEY register_Key;
//result = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\DevDiv\\vc\\Servicing\\12.0", 0, KEY_ALL_ACCESS, ®ister_Key);
result = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\DevDiv\\vc\\Servicing\\12.0\\RuntimeMinimum\\Install", 0, KEY_READ, ®ister_Key);
if(result == ERROR_SUCCESS)
return;
STARTUPINFO si = {sizeof (STARTUPINFO)};
PROCESS_INFORMATION pi;
CreateProcess("vcredist_x64.exe", NULL, 0, 0, 0, 0, 0, 0, &si, &pi);
WaitForSingleObject(pi.hProcess, INFINITE);
} |
Partager