diff options
Diffstat (limited to 'src/engine/elevation.cpp')
| -rw-r--r-- | src/engine/elevation.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/engine/elevation.cpp b/src/engine/elevation.cpp index d0652270..9ce04630 100644 --- a/src/engine/elevation.cpp +++ b/src/engine/elevation.cpp | |||
| @@ -1087,7 +1087,7 @@ extern "C" HRESULT ElevationLoadCompatiblePackageAction( | |||
| 1087 | hr = BuffWriteString(&pbData, &cbData, pExecuteAction->compatiblePackage.sczInstalledProductCode); | 1087 | hr = BuffWriteString(&pbData, &cbData, pExecuteAction->compatiblePackage.sczInstalledProductCode); |
| 1088 | ExitOnFailure(hr, "Failed to write installed ProductCode to message buffer."); | 1088 | ExitOnFailure(hr, "Failed to write installed ProductCode to message buffer."); |
| 1089 | 1089 | ||
| 1090 | hr = BuffWriteNumber64(&pbData, &cbData, pExecuteAction->compatiblePackage.qwInstalledVersion); | 1090 | hr = BuffWriteString(&pbData, &cbData, pExecuteAction->compatiblePackage.pInstalledVersion->sczVersion); |
| 1091 | ExitOnFailure(hr, "Failed to write installed version to message buffer."); | 1091 | ExitOnFailure(hr, "Failed to write installed version to message buffer."); |
| 1092 | 1092 | ||
| 1093 | // Send the message. | 1093 | // Send the message. |
| @@ -2566,6 +2566,7 @@ static HRESULT OnLoadCompatiblePackage( | |||
| 2566 | HRESULT hr = S_OK; | 2566 | HRESULT hr = S_OK; |
| 2567 | SIZE_T iData = 0; | 2567 | SIZE_T iData = 0; |
| 2568 | LPWSTR sczPackage = NULL; | 2568 | LPWSTR sczPackage = NULL; |
| 2569 | LPWSTR sczVersion = NULL; | ||
| 2569 | BURN_EXECUTE_ACTION executeAction = { }; | 2570 | BURN_EXECUTE_ACTION executeAction = { }; |
| 2570 | 2571 | ||
| 2571 | executeAction.type = BURN_EXECUTE_ACTION_TYPE_COMPATIBLE_PACKAGE; | 2572 | executeAction.type = BURN_EXECUTE_ACTION_TYPE_COMPATIBLE_PACKAGE; |
| @@ -2581,20 +2582,24 @@ static HRESULT OnLoadCompatiblePackage( | |||
| 2581 | hr = BuffReadString(pbData, cbData, &iData, &executeAction.compatiblePackage.sczInstalledProductCode); | 2582 | hr = BuffReadString(pbData, cbData, &iData, &executeAction.compatiblePackage.sczInstalledProductCode); |
| 2582 | ExitOnFailure(hr, "Failed to read installed ProductCode from message buffer."); | 2583 | ExitOnFailure(hr, "Failed to read installed ProductCode from message buffer."); |
| 2583 | 2584 | ||
| 2584 | hr = BuffReadNumber64(pbData, cbData, &iData, &executeAction.compatiblePackage.qwInstalledVersion); | 2585 | hr = BuffReadString(pbData, cbData, &iData, &sczVersion); |
| 2585 | ExitOnFailure(hr, "Failed to read installed version from message buffer."); | 2586 | ExitOnFailure(hr, "Failed to read installed version from message buffer."); |
| 2586 | 2587 | ||
| 2588 | hr = VerParseVersion(sczVersion, 0, FALSE, &executeAction.compatiblePackage.pInstalledVersion); | ||
| 2589 | ExitOnFailure(hr, "Failed to parse installed version from compatible package."); | ||
| 2590 | |||
| 2587 | // Copy the installed data to the reference package. | 2591 | // Copy the installed data to the reference package. |
| 2588 | hr = StrAllocString(&executeAction.compatiblePackage.pReferencePackage->Msi.sczInstalledProductCode, executeAction.compatiblePackage.sczInstalledProductCode, 0); | 2592 | hr = StrAllocString(&executeAction.compatiblePackage.pReferencePackage->Msi.sczInstalledProductCode, executeAction.compatiblePackage.sczInstalledProductCode, 0); |
| 2589 | ExitOnFailure(hr, "Failed to copy installed ProductCode."); | 2593 | ExitOnFailure(hr, "Failed to copy installed ProductCode."); |
| 2590 | 2594 | ||
| 2591 | executeAction.compatiblePackage.pReferencePackage->Msi.qwInstalledVersion = executeAction.compatiblePackage.qwInstalledVersion; | 2595 | executeAction.compatiblePackage.pReferencePackage->Msi.pInstalledVersion = executeAction.compatiblePackage.pInstalledVersion; |
| 2592 | 2596 | ||
| 2593 | // Load the compatible package and add it to the list. | 2597 | // Load the compatible package and add it to the list. |
| 2594 | hr = MsiEngineAddCompatiblePackage(pPackages, executeAction.compatiblePackage.pReferencePackage, NULL); | 2598 | hr = MsiEngineAddCompatiblePackage(pPackages, executeAction.compatiblePackage.pReferencePackage, NULL); |
| 2595 | ExitOnFailure(hr, "Failed to load compatible package."); | 2599 | ExitOnFailure(hr, "Failed to load compatible package."); |
| 2596 | 2600 | ||
| 2597 | LExit: | 2601 | LExit: |
| 2602 | ReleaseStr(sczVersion); | ||
| 2598 | ReleaseStr(sczPackage); | 2603 | ReleaseStr(sczPackage); |
| 2599 | PlanUninitializeExecuteAction(&executeAction); | 2604 | PlanUninitializeExecuteAction(&executeAction); |
| 2600 | 2605 | ||
