diff options
| author | Rob Mensching <rob@firegiant.com> | 2021-04-12 22:49:25 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2021-04-14 12:15:52 -0700 |
| commit | 8b47ea48058fb96e2e647b8cfa5d5b939bee35bc (patch) | |
| tree | 73685984d4c1f6c0453fd3f2fb3b61216eeda7ec /src | |
| parent | 74c40b3fddc937d1884c82355f9fed8a5481ea4a (diff) | |
| download | wix-8b47ea48058fb96e2e647b8cfa5d5b939bee35bc.tar.gz wix-8b47ea48058fb96e2e647b8cfa5d5b939bee35bc.tar.bz2 wix-8b47ea48058fb96e2e647b8cfa5d5b939bee35bc.zip | |
Detect system MSI packages before user managed packages
Diffstat (limited to 'src')
| -rw-r--r-- | src/engine/msiengine.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/engine/msiengine.cpp b/src/engine/msiengine.cpp index 6c5b760b..4f6062ea 100644 --- a/src/engine/msiengine.cpp +++ b/src/engine/msiengine.cpp | |||
| @@ -522,19 +522,19 @@ extern "C" HRESULT MsiEngineDetectPackage( | |||
| 522 | } | 522 | } |
| 523 | 523 | ||
| 524 | // get product version | 524 | // get product version |
| 525 | hr = WiuGetProductInfoEx(wzProductCode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, INSTALLPROPERTY_VERSIONSTRING, &sczInstalledVersion); | 525 | hr = WiuGetProductInfoEx(wzProductCode, NULL, MSIINSTALLCONTEXT_MACHINE, INSTALLPROPERTY_VERSIONSTRING, &sczInstalledVersion); |
| 526 | if (HRESULT_FROM_WIN32(ERROR_UNKNOWN_PRODUCT) != hr && HRESULT_FROM_WIN32(ERROR_UNKNOWN_PROPERTY) != hr) | 526 | if (HRESULT_FROM_WIN32(ERROR_UNKNOWN_PRODUCT) != hr && HRESULT_FROM_WIN32(ERROR_UNKNOWN_PROPERTY) != hr) |
| 527 | { | 527 | { |
| 528 | ExitOnFailure(hr, "Failed to get version for product in user unmanaged context: %ls", wzProductCode); | 528 | ExitOnFailure(hr, "Failed to get version for product in machine context: %ls", wzProductCode); |
| 529 | fPerMachine = FALSE; | 529 | fPerMachine = TRUE; |
| 530 | } | 530 | } |
| 531 | else | 531 | else |
| 532 | { | 532 | { |
| 533 | hr = WiuGetProductInfoEx(wzProductCode, NULL, MSIINSTALLCONTEXT_MACHINE, INSTALLPROPERTY_VERSIONSTRING, &sczInstalledVersion); | 533 | hr = WiuGetProductInfoEx(wzProductCode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, INSTALLPROPERTY_VERSIONSTRING, &sczInstalledVersion); |
| 534 | if (HRESULT_FROM_WIN32(ERROR_UNKNOWN_PRODUCT) != hr && HRESULT_FROM_WIN32(ERROR_UNKNOWN_PROPERTY) != hr) | 534 | if (HRESULT_FROM_WIN32(ERROR_UNKNOWN_PRODUCT) != hr && HRESULT_FROM_WIN32(ERROR_UNKNOWN_PROPERTY) != hr) |
| 535 | { | 535 | { |
| 536 | ExitOnFailure(hr, "Failed to get version for product in machine context: %ls", wzProductCode); | 536 | ExitOnFailure(hr, "Failed to get version for product in user unmanaged context: %ls", wzProductCode); |
| 537 | fPerMachine = TRUE; | 537 | fPerMachine = FALSE; |
| 538 | } | 538 | } |
| 539 | else | 539 | else |
| 540 | { | 540 | { |
