diff options
Diffstat (limited to 'src/engine/msiengine.cpp')
| -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 | { |
