diff options
Diffstat (limited to '')
| -rw-r--r-- | src/libs/dutil/WixToolset.DUtil/wiutil.cpp | 15 |
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 | ||
| 432 | LExit: | 437 | LExit: |
| @@ -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 | ||
| 471 | LExit: | 484 | LExit: |
