diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2022-08-08 18:02:15 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2022-08-09 09:57:02 -0500 |
commit | 240b663ad5fc94ed6d19c966b5c9105a176ecf40 (patch) | |
tree | d194e242ccb5bb69f0dbbc388ede87cef65c700f /src/burn/engine/bundlepackageengine.cpp | |
parent | 8e1cbe8d7b468553d76c20452561e89726de5c47 (diff) | |
download | wix-240b663ad5fc94ed6d19c966b5c9105a176ecf40.tar.gz wix-240b663ad5fc94ed6d19c966b5c9105a176ecf40.tar.bz2 wix-240b663ad5fc94ed6d19c966b5c9105a176ecf40.zip |
Skip logging errors in some places when they are due to missing files or registry keys or values.
Related to 6696
Diffstat (limited to 'src/burn/engine/bundlepackageengine.cpp')
-rw-r--r-- | src/burn/engine/bundlepackageengine.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/burn/engine/bundlepackageengine.cpp b/src/burn/engine/bundlepackageengine.cpp index dafe1967..8896fdd0 100644 --- a/src/burn/engine/bundlepackageengine.cpp +++ b/src/burn/engine/bundlepackageengine.cpp | |||
@@ -1049,6 +1049,7 @@ static HRESULT DetectArpEntry( | |||
1049 | { | 1049 | { |
1050 | HRESULT hr = S_OK; | 1050 | HRESULT hr = S_OK; |
1051 | HKEY hKey = NULL; | 1051 | HKEY hKey = NULL; |
1052 | BOOL fExists = FALSE; | ||
1052 | HKEY hkRoot = pPackage->fPerMachine ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; | 1053 | HKEY hkRoot = pPackage->fPerMachine ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; |
1053 | REG_KEY_BITNESS keyBitness = pPackage->Bundle.fWin64 ? REG_KEY_64BIT : REG_KEY_32BIT; | 1054 | REG_KEY_BITNESS keyBitness = pPackage->Bundle.fWin64 ? REG_KEY_64BIT : REG_KEY_32BIT; |
1054 | 1055 | ||
@@ -1065,20 +1066,17 @@ static HRESULT DetectArpEntry( | |||
1065 | } | 1066 | } |
1066 | 1067 | ||
1067 | hr = RegOpenEx(hkRoot, pPackage->Bundle.sczArpKeyPath, KEY_READ, keyBitness, &hKey); | 1068 | hr = RegOpenEx(hkRoot, pPackage->Bundle.sczArpKeyPath, KEY_READ, keyBitness, &hKey); |
1068 | if (HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) == hr || HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) == hr) | 1069 | ExitOnPathFailure(hr, fExists, "Failed to open registry key: %ls.", pPackage->Bundle.sczArpKeyPath); |
1070 | |||
1071 | if (!fExists) | ||
1069 | { | 1072 | { |
1070 | ExitFunction1(hr = S_OK); | 1073 | ExitFunction(); |
1071 | } | 1074 | } |
1072 | ExitOnFailure(hr, "Failed to open registry key: %ls.", pPackage->Bundle.sczArpKeyPath); | ||
1073 | 1075 | ||
1074 | *pfRegistered = TRUE; | 1076 | *pfRegistered = TRUE; |
1075 | 1077 | ||
1076 | hr = RegReadString(hKey, L"QuietUninstallString", psczQuietUninstallString); | 1078 | hr = RegReadString(hKey, L"QuietUninstallString", psczQuietUninstallString); |
1077 | if (HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) == hr) | 1079 | ExitOnPathFailure(hr, fExists, "Failed to read QuietUninstallString."); |
1078 | { | ||
1079 | hr = S_OK; | ||
1080 | } | ||
1081 | ExitOnFailure(hr, "Failed to read QuietUninstallString."); | ||
1082 | 1080 | ||
1083 | LExit: | 1081 | LExit: |
1084 | ReleaseRegKey(hKey); | 1082 | ReleaseRegKey(hKey); |