diff options
Diffstat (limited to 'src/engine/registration.cpp')
-rw-r--r-- | src/engine/registration.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/engine/registration.cpp b/src/engine/registration.cpp index eace62ce..3c3dc95d 100644 --- a/src/engine/registration.cpp +++ b/src/engine/registration.cpp | |||
@@ -133,7 +133,7 @@ extern "C" HRESULT RegistrationParseFromXml( | |||
133 | hr = XmlGetAttributeEx(pixnRegistrationNode, L"Version", &scz); | 133 | hr = XmlGetAttributeEx(pixnRegistrationNode, L"Version", &scz); |
134 | ExitOnFailure(hr, "Failed to get @Version."); | 134 | ExitOnFailure(hr, "Failed to get @Version."); |
135 | 135 | ||
136 | hr = FileVersionFromStringEx(scz, 0, &pRegistration->qwVersion); | 136 | hr = VerParseVersion(scz, 0, FALSE, &pRegistration->pVersion); |
137 | ExitOnFailure(hr, "Failed to parse @Version: %ls", scz); | 137 | ExitOnFailure(hr, "Failed to parse @Version: %ls", scz); |
138 | 138 | ||
139 | // @ProviderKey | 139 | // @ProviderKey |
@@ -436,7 +436,7 @@ extern "C" HRESULT RegistrationSetVariables( | |||
436 | hr = VariableSetString(pVariables, BURN_BUNDLE_TAG, pRegistration->sczTag, TRUE, FALSE); | 436 | hr = VariableSetString(pVariables, BURN_BUNDLE_TAG, pRegistration->sczTag, TRUE, FALSE); |
437 | ExitOnFailure(hr, "Failed to overwrite the bundle tag built-in variable."); | 437 | ExitOnFailure(hr, "Failed to overwrite the bundle tag built-in variable."); |
438 | 438 | ||
439 | hr = VariableSetVersion(pVariables, BURN_BUNDLE_VERSION, pRegistration->qwVersion, TRUE); | 439 | hr = VariableSetVersion(pVariables, BURN_BUNDLE_VERSION, pRegistration->pVersion, TRUE); |
440 | ExitOnFailure(hr, "Failed to overwrite the bundle tag built-in variable."); | 440 | ExitOnFailure(hr, "Failed to overwrite the bundle tag built-in variable."); |
441 | 441 | ||
442 | LExit: | 442 | LExit: |
@@ -630,15 +630,13 @@ extern "C" HRESULT RegistrationSessionBegin( | |||
630 | hr = RegWriteStringArray(hkRegistration, BURN_REGISTRATION_REGISTRY_BUNDLE_PATCH_CODE, pRegistration->rgsczPatchCodes, pRegistration->cPatchCodes); | 630 | hr = RegWriteStringArray(hkRegistration, BURN_REGISTRATION_REGISTRY_BUNDLE_PATCH_CODE, pRegistration->rgsczPatchCodes, pRegistration->cPatchCodes); |
631 | ExitOnFailure(hr, "Failed to write %ls value.", BURN_REGISTRATION_REGISTRY_BUNDLE_PATCH_CODE); | 631 | ExitOnFailure(hr, "Failed to write %ls value.", BURN_REGISTRATION_REGISTRY_BUNDLE_PATCH_CODE); |
632 | 632 | ||
633 | hr = RegWriteStringFormatted(hkRegistration, BURN_REGISTRATION_REGISTRY_BUNDLE_VERSION, L"%hu.%hu.%hu.%hu", | 633 | hr = RegWriteString(hkRegistration, BURN_REGISTRATION_REGISTRY_BUNDLE_VERSION, pRegistration->pVersion->sczVersion); |
634 | static_cast<WORD>(pRegistration->qwVersion >> 48), static_cast<WORD>(pRegistration->qwVersion >> 32), | ||
635 | static_cast<WORD>(pRegistration->qwVersion >> 16), static_cast<WORD>(pRegistration->qwVersion)); | ||
636 | ExitOnFailure(hr, "Failed to write %ls value.", BURN_REGISTRATION_REGISTRY_BUNDLE_VERSION); | 634 | ExitOnFailure(hr, "Failed to write %ls value.", BURN_REGISTRATION_REGISTRY_BUNDLE_VERSION); |
637 | 635 | ||
638 | hr = RegWriteNumber(hkRegistration, REGISTRY_BUNDLE_VERSION_MAJOR, static_cast<WORD>(pRegistration->qwVersion >> 48)); | 636 | hr = RegWriteNumber(hkRegistration, REGISTRY_BUNDLE_VERSION_MAJOR, pRegistration->pVersion->dwMajor); |
639 | ExitOnFailure(hr, "Failed to write %ls value.", REGISTRY_BUNDLE_VERSION_MAJOR); | 637 | ExitOnFailure(hr, "Failed to write %ls value.", REGISTRY_BUNDLE_VERSION_MAJOR); |
640 | 638 | ||
641 | hr = RegWriteNumber(hkRegistration, REGISTRY_BUNDLE_VERSION_MINOR, static_cast<WORD>(pRegistration->qwVersion >> 32)); | 639 | hr = RegWriteNumber(hkRegistration, REGISTRY_BUNDLE_VERSION_MINOR, pRegistration->pVersion->dwMinor); |
642 | ExitOnFailure(hr, "Failed to write %ls value.", REGISTRY_BUNDLE_VERSION_MINOR); | 640 | ExitOnFailure(hr, "Failed to write %ls value.", REGISTRY_BUNDLE_VERSION_MINOR); |
643 | 641 | ||
644 | if (pRegistration->sczProviderKey) | 642 | if (pRegistration->sczProviderKey) |