aboutsummaryrefslogtreecommitdiff
path: root/src/burn/engine/apply.cpp
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2022-01-31 15:44:00 -0600
committerSean Hall <r.sean.hall@gmail.com>2022-02-01 23:36:23 -0600
commit56c980318e7167be591f7807c2fc34cea7d5cb42 (patch)
treee074b3548d8dfe51f420b6d0278a6fe17191b6ec /src/burn/engine/apply.cpp
parentbfe5ab76b5ecc1a21078534e6fba90d12cfd3c00 (diff)
downloadwix-56c980318e7167be591f7807c2fc34cea7d5cb42.tar.gz
wix-56c980318e7167be591f7807c2fc34cea7d5cb42.tar.bz2
wix-56c980318e7167be591f7807c2fc34cea7d5cb42.zip
The bundle provider's presence needs to follow ARP registration.
Diffstat (limited to 'src/burn/engine/apply.cpp')
-rw-r--r--src/burn/engine/apply.cpp41
1 files changed, 21 insertions, 20 deletions
diff --git a/src/burn/engine/apply.cpp b/src/burn/engine/apply.cpp
index 6bf3020c..9185e33a 100644
--- a/src/burn/engine/apply.cpp
+++ b/src/burn/engine/apply.cpp
@@ -432,12 +432,12 @@ extern "C" HRESULT ApplyRegister(
432 // begin new session 432 // begin new session
433 if (pEngineState->registration.fPerMachine) 433 if (pEngineState->registration.fPerMachine)
434 { 434 {
435 hr = ElevationSessionBegin(pEngineState->companionConnection.hPipe, sczEngineWorkingPath, pEngineState->registration.sczResumeCommandLine, pEngineState->registration.fDisableResume, &pEngineState->variables, pEngineState->plan.dwRegistrationOperations, pEngineState->plan.dependencyRegistrationAction, pEngineState->plan.qwEstimatedSize, registrationType); 435 hr = ElevationSessionBegin(pEngineState->companionConnection.hPipe, sczEngineWorkingPath, pEngineState->registration.sczResumeCommandLine, pEngineState->registration.fDisableResume, &pEngineState->variables, pEngineState->plan.dwRegistrationOperations, pEngineState->registration.fDetectedForeignProviderKeyBundleId, pEngineState->plan.qwEstimatedSize, registrationType);
436 ExitOnFailure(hr, "Failed to begin registration session in per-machine process."); 436 ExitOnFailure(hr, "Failed to begin registration session in per-machine process.");
437 } 437 }
438 else 438 else
439 { 439 {
440 hr = RegistrationSessionBegin(sczEngineWorkingPath, &pEngineState->registration, &pEngineState->cache, &pEngineState->variables, pEngineState->plan.dwRegistrationOperations, pEngineState->plan.dependencyRegistrationAction, pEngineState->plan.qwEstimatedSize, registrationType); 440 hr = RegistrationSessionBegin(sczEngineWorkingPath, &pEngineState->registration, &pEngineState->cache, &pEngineState->variables, pEngineState->plan.dwRegistrationOperations, pEngineState->plan.qwEstimatedSize, registrationType);
441 ExitOnFailure(hr, "Failed to begin registration session."); 441 ExitOnFailure(hr, "Failed to begin registration session.");
442 } 442 }
443 } 443 }
@@ -521,12 +521,12 @@ extern "C" HRESULT ApplyUnregister(
521 521
522 if (pEngineState->registration.fPerMachine) 522 if (pEngineState->registration.fPerMachine)
523 { 523 {
524 hr = ElevationSessionEnd(pEngineState->companionConnection.hPipe, resumeMode, restart, pEngineState->plan.dependencyRegistrationAction, registrationType); 524 hr = ElevationSessionEnd(pEngineState->companionConnection.hPipe, resumeMode, restart, pEngineState->registration.fDetectedForeignProviderKeyBundleId, registrationType);
525 ExitOnFailure(hr, "Failed to end session in per-machine process."); 525 ExitOnFailure(hr, "Failed to end session in per-machine process.");
526 } 526 }
527 else 527 else
528 { 528 {
529 hr = RegistrationSessionEnd(&pEngineState->registration, &pEngineState->cache, &pEngineState->variables, &pEngineState->packages, resumeMode, restart, pEngineState->plan.dependencyRegistrationAction, registrationType); 529 hr = RegistrationSessionEnd(&pEngineState->registration, &pEngineState->cache, &pEngineState->variables, &pEngineState->packages, resumeMode, restart, registrationType);
530 ExitOnFailure(hr, "Failed to end session in per-user process."); 530 ExitOnFailure(hr, "Failed to end session in per-user process.");
531 } 531 }
532 532
@@ -2914,8 +2914,9 @@ static HRESULT ExecuteDependencyAction(
2914 ) 2914 )
2915{ 2915{
2916 HRESULT hr = S_OK; 2916 HRESULT hr = S_OK;
2917 BURN_PACKAGE* pPackage = pAction->packageDependency.pPackage;
2917 2918
2918 if (pAction->packageDependency.pPackage->fPerMachine) 2919 if (pPackage->fPerMachine)
2919 { 2920 {
2920 hr = ElevationExecutePackageDependencyAction(pEngineState->companionConnection.hPipe, pAction); 2921 hr = ElevationExecutePackageDependencyAction(pEngineState->companionConnection.hPipe, pAction);
2921 ExitOnFailure(hr, "Failed to register the dependency on per-machine package."); 2922 ExitOnFailure(hr, "Failed to register the dependency on per-machine package.");
@@ -2926,20 +2927,20 @@ static HRESULT ExecuteDependencyAction(
2926 ExitOnFailure(hr, "Failed to register the dependency on per-user package."); 2927 ExitOnFailure(hr, "Failed to register the dependency on per-user package.");
2927 } 2928 }
2928 2929
2929 if (pAction->packageDependency.pPackage->fCanAffectRegistration) 2930 if (pPackage->fCanAffectRegistration)
2930 { 2931 {
2931 if (BURN_DEPENDENCY_ACTION_REGISTER == pAction->packageDependency.action) 2932 if (BURN_DEPENDENCY_ACTION_REGISTER == pAction->packageDependency.action)
2932 { 2933 {
2933 if (BURN_PACKAGE_REGISTRATION_STATE_IGNORED == pAction->packageDependency.pPackage->cacheRegistrationState) 2934 if (BURN_PACKAGE_REGISTRATION_STATE_IGNORED == pPackage->cacheRegistrationState)
2934 { 2935 {
2935 pAction->packageDependency.pPackage->cacheRegistrationState = BURN_PACKAGE_REGISTRATION_STATE_PRESENT; 2936 pPackage->cacheRegistrationState = BURN_PACKAGE_REGISTRATION_STATE_PRESENT;
2936 } 2937 }
2937 2938
2938 if (BURN_PACKAGE_TYPE_MSP == pAction->packageDependency.pPackage->type) 2939 if (BURN_PACKAGE_TYPE_MSP == pPackage->type)
2939 { 2940 {
2940 for (DWORD i = 0; i < pAction->packageDependency.pPackage->Msp.cTargetProductCodes; ++i) 2941 for (DWORD i = 0; i < pPackage->Msp.cTargetProductCodes; ++i)
2941 { 2942 {
2942 BURN_MSPTARGETPRODUCT* pTargetProduct = pAction->packageDependency.pPackage->Msp.rgTargetProducts + i; 2943 BURN_MSPTARGETPRODUCT* pTargetProduct = pPackage->Msp.rgTargetProducts + i;
2943 2944
2944 if (BURN_PACKAGE_REGISTRATION_STATE_IGNORED == pTargetProduct->registrationState) 2945 if (BURN_PACKAGE_REGISTRATION_STATE_IGNORED == pTargetProduct->registrationState)
2945 { 2946 {
@@ -2947,23 +2948,23 @@ static HRESULT ExecuteDependencyAction(
2947 } 2948 }
2948 } 2949 }
2949 } 2950 }
2950 else if (BURN_PACKAGE_REGISTRATION_STATE_IGNORED == pAction->packageDependency.pPackage->installRegistrationState) 2951 else if (BURN_PACKAGE_REGISTRATION_STATE_IGNORED == pPackage->installRegistrationState)
2951 { 2952 {
2952 pAction->packageDependency.pPackage->installRegistrationState = BURN_PACKAGE_REGISTRATION_STATE_PRESENT; 2953 pPackage->installRegistrationState = BURN_PACKAGE_REGISTRATION_STATE_PRESENT;
2953 } 2954 }
2954 } 2955 }
2955 else if (BURN_DEPENDENCY_ACTION_UNREGISTER == pAction->packageDependency.action) 2956 else if (BURN_DEPENDENCY_ACTION_UNREGISTER == pAction->packageDependency.action)
2956 { 2957 {
2957 if (BURN_PACKAGE_REGISTRATION_STATE_PRESENT == pAction->packageDependency.pPackage->cacheRegistrationState) 2958 if (BURN_PACKAGE_REGISTRATION_STATE_PRESENT == pPackage->cacheRegistrationState)
2958 { 2959 {
2959 pAction->packageDependency.pPackage->cacheRegistrationState = BURN_PACKAGE_REGISTRATION_STATE_IGNORED; 2960 pPackage->cacheRegistrationState = BURN_PACKAGE_REGISTRATION_STATE_IGNORED;
2960 } 2961 }
2961 2962
2962 if (BURN_PACKAGE_TYPE_MSP == pAction->packageDependency.pPackage->type) 2963 if (BURN_PACKAGE_TYPE_MSP == pPackage->type)
2963 { 2964 {
2964 for (DWORD i = 0; i < pAction->packageDependency.pPackage->Msp.cTargetProductCodes; ++i) 2965 for (DWORD i = 0; i < pPackage->Msp.cTargetProductCodes; ++i)
2965 { 2966 {
2966 BURN_MSPTARGETPRODUCT* pTargetProduct = pAction->packageDependency.pPackage->Msp.rgTargetProducts + i; 2967 BURN_MSPTARGETPRODUCT* pTargetProduct = pPackage->Msp.rgTargetProducts + i;
2967 2968
2968 if (BURN_PACKAGE_REGISTRATION_STATE_PRESENT == pTargetProduct->registrationState) 2969 if (BURN_PACKAGE_REGISTRATION_STATE_PRESENT == pTargetProduct->registrationState)
2969 { 2970 {
@@ -2971,9 +2972,9 @@ static HRESULT ExecuteDependencyAction(
2971 } 2972 }
2972 } 2973 }
2973 } 2974 }
2974 else if (BURN_PACKAGE_REGISTRATION_STATE_PRESENT == pAction->packageDependency.pPackage->installRegistrationState) 2975 else if (BURN_PACKAGE_REGISTRATION_STATE_PRESENT == pPackage->installRegistrationState)
2975 { 2976 {
2976 pAction->packageDependency.pPackage->installRegistrationState = BURN_PACKAGE_REGISTRATION_STATE_IGNORED; 2977 pPackage->installRegistrationState = BURN_PACKAGE_REGISTRATION_STATE_IGNORED;
2977 } 2978 }
2978 } 2979 }
2979 } 2980 }