diff --git a/src/native/windows/run/registry.c b/src/native/windows/run/registry.c index 825ec0e4f..f293c5a3d 100644 --- a/src/native/windows/run/registry.c +++ b/src/native/windows/run/registry.c @@ -45,6 +45,8 @@ Run_getRegSzValue(HKEY key, LPCTSTR name, LPTSTR *data) } } } + else + error = ERROR_NOT_ENOUGH_MEMORY; } else error = ERROR_FILE_NOT_FOUND; diff --git a/src/native/windows/setup/setup.c b/src/native/windows/setup/setup.c index a16e06e1a..4ef8f1c90 100644 --- a/src/native/windows/setup/setup.c +++ b/src/native/windows/setup/setup.c @@ -861,7 +861,16 @@ Setup_findProductIdByPackageCode(LPCTSTR packageCode, LPTSTR *productId) free(packageCodeOfProductId); } else - LastError_setLastError(error, _T(__FILE__), __LINE__); + { + /* + * We failed to read one PackageCode out of many while looking + * for ours. Eventually, it makes no difference whether the + * failed one was ours or not. Most importantly, we cannot give + * up the search because the failed one may have not been ours + * anyway. + */ + error = ERROR_SUCCESS; + } RegCloseKey(subKey); if (ERROR_SUCCESS != error) break;