diff options
Diffstat (limited to 'src/burn/engine/apply.cpp')
| -rw-r--r-- | src/burn/engine/apply.cpp | 37 |
1 files changed, 9 insertions, 28 deletions
diff --git a/src/burn/engine/apply.cpp b/src/burn/engine/apply.cpp index 69106f65..d0db053a 100644 --- a/src/burn/engine/apply.cpp +++ b/src/burn/engine/apply.cpp | |||
| @@ -430,37 +430,18 @@ extern "C" HRESULT ApplyRegister( | |||
| 430 | hr = UserExperienceOnRegisterBegin(&pEngineState->userExperience, ®istrationType); | 430 | hr = UserExperienceOnRegisterBegin(&pEngineState->userExperience, ®istrationType); |
| 431 | ExitOnRootFailure(hr, "BA aborted register begin."); | 431 | ExitOnRootFailure(hr, "BA aborted register begin."); |
| 432 | 432 | ||
| 433 | // If we have a resume mode that suggests the bundle is on the machine. | 433 | hr = CacheCalculateBundleWorkingPath(pEngineState->plan.pCache, pEngineState->registration.sczExecutableName, &sczEngineWorkingPath); |
| 434 | if (BOOTSTRAPPER_RESUME_TYPE_REBOOT <= pEngineState->command.resumeType) | 434 | ExitOnFailure(hr, "Failed to calculate working path for engine."); |
| 435 | |||
| 436 | if (pEngineState->registration.fPerMachine) | ||
| 435 | { | 437 | { |
| 436 | // resume previous session | 438 | hr = ElevationSessionBegin(pEngineState->companionConnection.hPipe, sczEngineWorkingPath, pEngineState->registration.sczResumeCommandLine, pEngineState->registration.fDisableResume, &pEngineState->variables, pEngineState->plan.dwRegistrationOperations, pEngineState->registration.fDetectedForeignProviderKeyBundleId, qwEstimatedSize, registrationType); |
| 437 | if (pEngineState->registration.fPerMachine) | 439 | ExitOnFailure(hr, "Failed to begin registration session in per-machine process."); |
| 438 | { | ||
| 439 | hr = ElevationSessionResume(pEngineState->companionConnection.hPipe, pEngineState->registration.sczResumeCommandLine, pEngineState->registration.fDisableResume, &pEngineState->variables, registrationType); | ||
| 440 | ExitOnFailure(hr, "Failed to resume registration session in per-machine process."); | ||
| 441 | } | ||
| 442 | else | ||
| 443 | { | ||
| 444 | hr = RegistrationSessionResume(&pEngineState->registration, &pEngineState->variables, registrationType); | ||
| 445 | ExitOnFailure(hr, "Failed to resume registration session."); | ||
| 446 | } | ||
| 447 | } | 440 | } |
| 448 | else // need to complete registration on the machine. | 441 | else |
| 449 | { | 442 | { |
| 450 | hr = CacheCalculateBundleWorkingPath(pEngineState->plan.pCache, pEngineState->registration.sczExecutableName, &sczEngineWorkingPath); | 443 | hr = RegistrationSessionBegin(sczEngineWorkingPath, &pEngineState->registration, &pEngineState->cache, &pEngineState->variables, pEngineState->plan.dwRegistrationOperations, qwEstimatedSize, registrationType); |
| 451 | ExitOnFailure(hr, "Failed to calculate working path for engine."); | 444 | ExitOnFailure(hr, "Failed to begin registration session."); |
| 452 | |||
| 453 | // begin new session | ||
| 454 | if (pEngineState->registration.fPerMachine) | ||
| 455 | { | ||
| 456 | hr = ElevationSessionBegin(pEngineState->companionConnection.hPipe, sczEngineWorkingPath, pEngineState->registration.sczResumeCommandLine, pEngineState->registration.fDisableResume, &pEngineState->variables, pEngineState->plan.dwRegistrationOperations, pEngineState->registration.fDetectedForeignProviderKeyBundleId, qwEstimatedSize, registrationType); | ||
| 457 | ExitOnFailure(hr, "Failed to begin registration session in per-machine process."); | ||
| 458 | } | ||
| 459 | else | ||
| 460 | { | ||
| 461 | hr = RegistrationSessionBegin(sczEngineWorkingPath, &pEngineState->registration, &pEngineState->cache, &pEngineState->variables, pEngineState->plan.dwRegistrationOperations, qwEstimatedSize, registrationType); | ||
| 462 | ExitOnFailure(hr, "Failed to begin registration session."); | ||
| 463 | } | ||
| 464 | } | 445 | } |
| 465 | 446 | ||
| 466 | // Apply any registration actions. | 447 | // Apply any registration actions. |
