Skip to content

Instantly share code, notes, and snippets.

@OlivierLaflamme
Last active January 24, 2022 16:04
Show Gist options
  • Save OlivierLaflamme/95e7abd5835c19075e80db301deb283e to your computer and use it in GitHub Desktop.
Save OlivierLaflamme/95e7abd5835c19075e80db301deb283e to your computer and use it in GitHub Desktop.
Check for Microsoft Office Registry Key
BOOL chkOfficeRegKey() {
HKEY hkResult = NULL;
TCHAR lpSubKey[] = L"SOFTWARE\\Microsoft\\Office";
HKEY hKey = HKEY_CURRENT_USER;
if (RegOpenKeyEx(hKey, lpSubKey, NULL, KEY_ALL_ACCESS, &hkResult) == ERROR_SUCCESS)
{
return true;
}
else
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment