summaryrefslogtreecommitdiff
path: root/src/libs/dutil/WixToolset.DUtil/wiutil.cpp
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2022-08-08 18:02:15 -0500
committerSean Hall <r.sean.hall@gmail.com>2022-08-09 09:57:02 -0500
commit240b663ad5fc94ed6d19c966b5c9105a176ecf40 (patch)
treed194e242ccb5bb69f0dbbc388ede87cef65c700f /src/libs/dutil/WixToolset.DUtil/wiutil.cpp
parent8e1cbe8d7b468553d76c20452561e89726de5c47 (diff)
downloadwix-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 '')
-rw-r--r--src/libs/dutil/WixToolset.DUtil/wiutil.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/libs/dutil/WixToolset.DUtil/wiutil.cpp b/src/libs/dutil/WixToolset.DUtil/wiutil.cpp
index da7cffe7..5f81cf3a 100644
--- a/src/libs/dutil/WixToolset.DUtil/wiutil.cpp
+++ b/src/libs/dutil/WixToolset.DUtil/wiutil.cpp
@@ -427,6 +427,11 @@ extern "C" HRESULT DAPI WiuGetProductInfo(
427 427
428 er = vpfnMsiGetProductInfoW(wzProductCode, wzProperty, *psczValue, &cch); 428 er = vpfnMsiGetProductInfoW(wzProductCode, wzProperty, *psczValue, &cch);
429 } 429 }
430
431 if (ERROR_UNKNOWN_PRODUCT == er || ERROR_UNKNOWN_PROPERTY == er)
432 {
433 ExitFunction1(hr = HRESULT_FROM_WIN32(er));
434 }
430 WiuExitOnWin32Error(er, hr, "Failed to get product info."); 435 WiuExitOnWin32Error(er, hr, "Failed to get product info.");
431 436
432LExit: 437LExit:
@@ -449,7 +454,10 @@ extern "C" HRESULT DAPI WiuGetProductInfoEx(
449 if (!vpfnMsiGetProductInfoExW) 454 if (!vpfnMsiGetProductInfoExW)
450 { 455 {
451 hr = WiuGetProductInfo(wzProductCode, wzProperty, psczValue); 456 hr = WiuGetProductInfo(wzProductCode, wzProperty, psczValue);
452 WiuExitOnFailure(hr, "Failed to get product info when extended info was not available."); 457 if (HRESULT_FROM_WIN32(ERROR_UNKNOWN_PRODUCT) != hr && HRESULT_FROM_WIN32(ERROR_UNKNOWN_PROPERTY) != hr)
458 {
459 WiuExitOnFailure(hr, "Failed to get product info when extended info was not available.");
460 }
453 461
454 ExitFunction(); 462 ExitFunction();
455 } 463 }
@@ -466,6 +474,11 @@ extern "C" HRESULT DAPI WiuGetProductInfoEx(
466 474
467 er = vpfnMsiGetProductInfoExW(wzProductCode, wzUserSid, dwContext, wzProperty, *psczValue, &cch); 475 er = vpfnMsiGetProductInfoExW(wzProductCode, wzUserSid, dwContext, wzProperty, *psczValue, &cch);
468 } 476 }
477
478 if (ERROR_UNKNOWN_PRODUCT == er || ERROR_UNKNOWN_PROPERTY == er)
479 {
480 ExitFunction1(hr = HRESULT_FROM_WIN32(er));
481 }
469 WiuExitOnWin32Error(er, hr, "Failed to get extended product info."); 482 WiuExitOnWin32Error(er, hr, "Failed to get extended product info.");
470 483
471LExit: 484LExit: