From c88806b89293f5bb92c42e90230e48be6b79b7f4 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Fri, 16 Apr 2021 09:42:01 -0500 Subject: Detect whether the bundle is cached. --- src/engine/registration.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/engine/registration.cpp') diff --git a/src/engine/registration.cpp b/src/engine/registration.cpp index 9e27b177..7435f292 100644 --- a/src/engine/registration.cpp +++ b/src/engine/registration.cpp @@ -463,14 +463,15 @@ LExit: } extern "C" HRESULT RegistrationDetectInstalled( - __in BURN_REGISTRATION* pRegistration, - __out BOOL* pfInstalled + __in BURN_REGISTRATION* pRegistration ) { HRESULT hr = S_OK; HKEY hkRegistration = NULL; DWORD dwInstalled = 0; + pRegistration->fCached = FileExistsEx(pRegistration->sczCacheExecutablePath, NULL); + // open registration key hr = RegOpen(pRegistration->hkRoot, pRegistration->sczRegistrationKey, KEY_QUERY_VALUE, &hkRegistration); if (SUCCEEDED(hr)) @@ -484,7 +485,7 @@ extern "C" HRESULT RegistrationDetectInstalled( hr = S_OK; } - *pfInstalled = (1 == dwInstalled); + pRegistration->fInstalled = (1 == dwInstalled); ReleaseRegKey(hkRegistration); return hr; -- cgit v1.2.3-55-g6feb