From 20b57931445f5a1dc113648755ae3ba72f8e5f45 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sun, 3 Mar 2024 00:58:36 -0800 Subject: [PATCH] Remove clean.room --- .../BalBaseBootstrapperApplicationProc.cpp | 1012 ----------------- src/api/burn/mbanative/mbanative.cpp | 34 - src/api/burn/mbanative/mbanative.vcxproj | 1 - src/burn/engine/apply.cpp | 13 +- src/burn/engine/cache.cpp | 22 +- src/burn/engine/cache.h | 3 +- src/burn/engine/core.cpp | 180 +-- src/burn/engine/core.h | 12 - src/burn/engine/engine.cpp | 101 -- src/burn/engine/inc/engine.h | 4 - src/burn/engine/logging.cpp | 11 +- src/burn/engine/plan.cpp | 12 +- src/burn/engine/registration.cpp | 12 +- src/burn/engine/variable.cpp | 6 +- src/burn/stub/stub.cpp | 15 +- src/burn/test/BurnUnitTest/PlanTest.cpp | 2 +- .../test/BurnUnitTest/RegistrationTest.cpp | 2 +- .../Bal/test/examples/TestEngine/precomp.h | 4 - src/ext/Bal/wixiuiba/precomp.h | 5 - src/ext/Bal/wixiuiba/wixiuiba.h | 17 - src/ext/Bal/wixstdba/precomp.h | 24 - 21 files changed, 25 insertions(+), 1467 deletions(-) delete mode 100644 src/api/burn/balutil/BalBaseBootstrapperApplicationProc.cpp delete mode 100644 src/api/burn/mbanative/mbanative.cpp delete mode 100644 src/ext/Bal/wixiuiba/wixiuiba.h diff --git a/src/api/burn/balutil/BalBaseBootstrapperApplicationProc.cpp b/src/api/burn/balutil/BalBaseBootstrapperApplicationProc.cpp deleted file mode 100644 index 1b9b9e0e0..000000000 --- a/src/api/burn/balutil/BalBaseBootstrapperApplicationProc.cpp +++ /dev/null @@ -1,1012 +0,0 @@ -#pragma once -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -#if TODO_DELETE - -#include "precomp.h" - -static HRESULT BalBaseBAProcOnDetectBegin( - __in IBootstrapperApplication* pBA, - __in BA_ONDETECTBEGIN_ARGS* pArgs, - __inout BA_ONDETECTBEGIN_RESULTS* pResults - ) -{ - return pBA->OnDetectBegin(pArgs->fCached, pArgs->registrationType, pArgs->cPackages, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnDetectComplete( - __in IBootstrapperApplication* pBA, - __in BA_ONDETECTCOMPLETE_ARGS* pArgs, - __inout BA_ONDETECTCOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBA->OnDetectComplete(pArgs->hrStatus, pArgs->fEligibleForCleanup); -} - -static HRESULT BalBaseBAProcOnPlanBegin( - __in IBootstrapperApplication* pBA, - __in BA_ONPLANBEGIN_ARGS* pArgs, - __inout BA_ONPLANBEGIN_RESULTS* pResults - ) -{ - return pBA->OnPlanBegin(pArgs->cPackages, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnPlanComplete( - __in IBootstrapperApplication* pBA, - __in BA_ONPLANCOMPLETE_ARGS* pArgs, - __inout BA_ONPLANCOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBA->OnPlanComplete(pArgs->hrStatus); -} - -static HRESULT BalBaseBAProcOnStartup( - __in IBootstrapperApplication* pBA, - __in BA_ONSTARTUP_ARGS* /*pArgs*/, - __inout BA_ONSTARTUP_RESULTS* /*pResults*/ - ) -{ - return pBA->OnStartup(); -} - -static HRESULT BalBaseBAProcOnShutdown( - __in IBootstrapperApplication* pBA, - __in BA_ONSHUTDOWN_ARGS* /*pArgs*/, - __inout BA_ONSHUTDOWN_RESULTS* pResults - ) -{ - return pBA->OnShutdown(&pResults->action); -} - -static HRESULT BalBaseBAProcOnDetectForwardCompatibleBundle( - __in IBootstrapperApplication* pBA, - __in BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_ARGS* pArgs, - __inout BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_RESULTS* pResults - ) -{ - return pBA->OnDetectForwardCompatibleBundle(pArgs->wzBundleId, pArgs->relationType, pArgs->wzBundleTag, pArgs->fPerMachine, pArgs->wzVersion, pArgs->fMissingFromCache, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnDetectUpdateBegin( - __in IBootstrapperApplication* pBA, - __in BA_ONDETECTUPDATEBEGIN_ARGS* pArgs, - __inout BA_ONDETECTUPDATEBEGIN_RESULTS* pResults - ) -{ - return pBA->OnDetectUpdateBegin(pArgs->wzUpdateLocation, &pResults->fCancel, &pResults->fSkip); -} - -static HRESULT BalBaseBAProcOnDetectUpdate( - __in IBootstrapperApplication* pBA, - __in BA_ONDETECTUPDATE_ARGS* pArgs, - __inout BA_ONDETECTUPDATE_RESULTS* pResults - ) -{ - return pBA->OnDetectUpdate(pArgs->wzUpdateLocation, pArgs->dw64Size, pArgs->wzHash, pArgs->hashAlgorithm, pArgs->wzVersion, pArgs->wzTitle, pArgs->wzSummary, pArgs->wzContentType, pArgs->wzContent, &pResults->fCancel, &pResults->fStopProcessingUpdates); -} - -static HRESULT BalBaseBAProcOnDetectUpdateComplete( - __in IBootstrapperApplication* pBA, - __in BA_ONDETECTUPDATECOMPLETE_ARGS* pArgs, - __inout BA_ONDETECTUPDATECOMPLETE_RESULTS* pResults - ) -{ - return pBA->OnDetectUpdateComplete(pArgs->hrStatus, &pResults->fIgnoreError); -} - -static HRESULT BalBaseBAProcOnDetectRelatedBundle( - __in IBootstrapperApplication* pBA, - __in BA_ONDETECTRELATEDBUNDLE_ARGS* pArgs, - __inout BA_ONDETECTRELATEDBUNDLE_RESULTS* pResults - ) -{ - return pBA->OnDetectRelatedBundle(pArgs->wzBundleId, pArgs->relationType, pArgs->wzBundleTag, pArgs->fPerMachine, pArgs->wzVersion, pArgs->fMissingFromCache, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnDetectPackageBegin( - __in IBootstrapperApplication* pBA, - __in BA_ONDETECTPACKAGEBEGIN_ARGS* pArgs, - __inout BA_ONDETECTPACKAGEBEGIN_RESULTS* pResults - ) -{ - return pBA->OnDetectPackageBegin(pArgs->wzPackageId, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnDetectCompatiblePackage( - __in IBootstrapperApplication* pBA, - __in BA_ONDETECTCOMPATIBLEMSIPACKAGE_ARGS* pArgs, - __inout BA_ONDETECTCOMPATIBLEMSIPACKAGE_RESULTS* pResults - ) -{ - return pBA->OnDetectCompatibleMsiPackage(pArgs->wzPackageId, pArgs->wzCompatiblePackageId, pArgs->wzCompatiblePackageVersion, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnDetectRelatedMsiPackage( - __in IBootstrapperApplication* pBA, - __in BA_ONDETECTRELATEDMSIPACKAGE_ARGS* pArgs, - __inout BA_ONDETECTRELATEDMSIPACKAGE_RESULTS* pResults - ) -{ - return pBA->OnDetectRelatedMsiPackage(pArgs->wzPackageId, pArgs->wzUpgradeCode, pArgs->wzProductCode, pArgs->fPerMachine, pArgs->wzVersion, pArgs->operation, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnDetectPatchTarget( - __in IBootstrapperApplication* pBA, - __in BA_ONDETECTPATCHTARGET_ARGS* pArgs, - __inout BA_ONDETECTPATCHTARGET_RESULTS* pResults - ) -{ - return pBA->OnDetectPatchTarget(pArgs->wzPackageId, pArgs->wzProductCode, pArgs->patchState, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnDetectMsiFeature( - __in IBootstrapperApplication* pBA, - __in BA_ONDETECTMSIFEATURE_ARGS* pArgs, - __inout BA_ONDETECTMSIFEATURE_RESULTS* pResults - ) -{ - return pBA->OnDetectMsiFeature(pArgs->wzPackageId, pArgs->wzFeatureId, pArgs->state, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnDetectPackageComplete( - __in IBootstrapperApplication* pBA, - __in BA_ONDETECTPACKAGECOMPLETE_ARGS* pArgs, - __inout BA_ONDETECTPACKAGECOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBA->OnDetectPackageComplete(pArgs->wzPackageId, pArgs->hrStatus, pArgs->state, pArgs->fCached); -} - -static HRESULT BalBaseBAProcOnPlanRelatedBundle( - __in IBootstrapperApplication* pBA, - __in BA_ONPLANRELATEDBUNDLE_ARGS* pArgs, - __inout BA_ONPLANRELATEDBUNDLE_RESULTS* pResults - ) -{ - return pBA->OnPlanRelatedBundle(pArgs->wzBundleId, pArgs->recommendedState, &pResults->requestedState, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnPlanRollbackBoundary( - __in IBootstrapperApplication* pBA, - __in BA_ONPLANROLLBACKBOUNDARY_ARGS* pArgs, - __inout BA_ONPLANROLLBACKBOUNDARY_RESULTS* pResults - ) -{ - return pBA->OnPlanRollbackBoundary(pArgs->wzRollbackBoundaryId, pArgs->fRecommendedTransaction, &pResults->fTransaction, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnPlanPackageBegin( - __in IBootstrapperApplication* pBA, - __in BA_ONPLANPACKAGEBEGIN_ARGS* pArgs, - __inout BA_ONPLANPACKAGEBEGIN_RESULTS* pResults - ) -{ - return pBA->OnPlanPackageBegin(pArgs->wzPackageId, pArgs->state, pArgs->fCached, pArgs->installCondition, pArgs->repairCondition, pArgs->recommendedState, pArgs->recommendedCacheType, &pResults->requestedState, &pResults->requestedCacheType, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnPlanCompatibleMsiPackageBegin( - __in IBootstrapperApplication* pBA, - __in BA_ONPLANCOMPATIBLEMSIPACKAGEBEGIN_ARGS* pArgs, - __inout BA_ONPLANCOMPATIBLEMSIPACKAGEBEGIN_RESULTS* pResults - ) -{ - return pBA->OnPlanCompatibleMsiPackageBegin(pArgs->wzPackageId, pArgs->wzCompatiblePackageId, pArgs->wzCompatiblePackageVersion, pArgs->fRecommendedRemove, &pResults->fRequestRemove, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnPlanCompatibleMsiPackageComplete( - __in IBootstrapperApplication* pBA, - __in BA_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE_ARGS* pArgs, - __inout BA_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBA->OnPlanCompatibleMsiPackageComplete(pArgs->wzPackageId, pArgs->wzCompatiblePackageId, pArgs->hrStatus, pArgs->fRequestedRemove); -} - -static HRESULT BalBaseBAProcOnPlanPatchTarget( - __in IBootstrapperApplication* pBA, - __in BA_ONPLANPATCHTARGET_ARGS* pArgs, - __inout BA_ONPLANPATCHTARGET_RESULTS* pResults - ) -{ - return pBA->OnPlanPatchTarget(pArgs->wzPackageId, pArgs->wzProductCode, pArgs->recommendedState, &pResults->requestedState, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnPlanMsiFeature( - __in IBootstrapperApplication* pBA, - __in BA_ONPLANMSIFEATURE_ARGS* pArgs, - __inout BA_ONPLANMSIFEATURE_RESULTS* pResults - ) -{ - return pBA->OnPlanMsiFeature(pArgs->wzPackageId, pArgs->wzFeatureId, pArgs->recommendedState, &pResults->requestedState, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnPlanPackageComplete( - __in IBootstrapperApplication* pBA, - __in BA_ONPLANPACKAGECOMPLETE_ARGS* pArgs, - __inout BA_ONPLANPACKAGECOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBA->OnPlanPackageComplete(pArgs->wzPackageId, pArgs->hrStatus, pArgs->requested); -} - -static HRESULT BalBaseBAProcOnPlannedCompatiblePackage( - __in IBootstrapperApplication* pBA, - __in BA_ONPLANNEDCOMPATIBLEPACKAGE_ARGS* pArgs, - __inout BA_ONPLANNEDCOMPATIBLEPACKAGE_RESULTS* /*pResults*/ - ) -{ - return pBA->OnPlannedCompatiblePackage(pArgs->wzPackageId, pArgs->wzCompatiblePackageId, pArgs->fRemove); -} - -static HRESULT BalBaseBAProcOnPlannedPackage( - __in IBootstrapperApplication* pBA, - __in BA_ONPLANNEDPACKAGE_ARGS* pArgs, - __inout BA_ONPLANNEDPACKAGE_RESULTS* /*pResults*/ - ) -{ - return pBA->OnPlannedPackage(pArgs->wzPackageId, pArgs->execute, pArgs->rollback, pArgs->fPlannedCache, pArgs->fPlannedUncache); -} - -static HRESULT BalBaseBAProcOnApplyBegin( - __in IBootstrapperApplication* pBA, - __in BA_ONAPPLYBEGIN_ARGS* pArgs, - __inout BA_ONAPPLYBEGIN_RESULTS* pResults - ) -{ - return pBA->OnApplyBegin(pArgs->dwPhaseCount, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnElevateBegin( - __in IBootstrapperApplication* pBA, - __in BA_ONELEVATEBEGIN_ARGS* /*pArgs*/, - __inout BA_ONELEVATEBEGIN_RESULTS* pResults - ) -{ - return pBA->OnElevateBegin(&pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnElevateComplete( - __in IBootstrapperApplication* pBA, - __in BA_ONELEVATECOMPLETE_ARGS* pArgs, - __inout BA_ONELEVATECOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBA->OnElevateComplete(pArgs->hrStatus); -} - -static HRESULT BalBaseBAProcOnProgress( - __in IBootstrapperApplication* pBA, - __in BA_ONPROGRESS_ARGS* pArgs, - __inout BA_ONPROGRESS_RESULTS* pResults - ) -{ - return pBA->OnProgress(pArgs->dwProgressPercentage, pArgs->dwOverallPercentage, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnError( - __in IBootstrapperApplication* pBA, - __in BA_ONERROR_ARGS* pArgs, - __inout BA_ONERROR_RESULTS* pResults - ) -{ - return pBA->OnError(pArgs->errorType, pArgs->wzPackageId, pArgs->dwCode, pArgs->wzError, pArgs->dwUIHint, pArgs->cData, pArgs->rgwzData, pArgs->nRecommendation, &pResults->nResult); -} - -static HRESULT BalBaseBAProcOnRegisterBegin( - __in IBootstrapperApplication* pBA, - __in BA_ONREGISTERBEGIN_ARGS* pArgs, - __inout BA_ONREGISTERBEGIN_RESULTS* pResults - ) -{ - return pBA->OnRegisterBegin(pArgs->recommendedRegistrationType, &pResults->fCancel, &pResults->registrationType); -} - -static HRESULT BalBaseBAProcOnRegisterComplete( - __in IBootstrapperApplication* pBA, - __in BA_ONREGISTERCOMPLETE_ARGS* pArgs, - __inout BA_ONREGISTERCOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBA->OnRegisterComplete(pArgs->hrStatus); -} - -static HRESULT BalBaseBAProcOnCacheBegin( - __in IBootstrapperApplication* pBA, - __in BA_ONCACHEBEGIN_ARGS* /*pArgs*/, - __inout BA_ONCACHEBEGIN_RESULTS* pResults - ) -{ - return pBA->OnCacheBegin(&pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnCachePackageBegin( - __in IBootstrapperApplication* pBA, - __in BA_ONCACHEPACKAGEBEGIN_ARGS* pArgs, - __inout BA_ONCACHEPACKAGEBEGIN_RESULTS* pResults - ) -{ - return pBA->OnCachePackageBegin(pArgs->wzPackageId, pArgs->cCachePayloads, pArgs->dw64PackageCacheSize, pArgs->fVital, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnCacheAcquireBegin( - __in IBootstrapperApplication* pBA, - __in BA_ONCACHEACQUIREBEGIN_ARGS* pArgs, - __inout BA_ONCACHEACQUIREBEGIN_RESULTS* pResults - ) -{ - return pBA->OnCacheAcquireBegin(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->wzSource, pArgs->wzDownloadUrl, pArgs->wzPayloadContainerId, pArgs->recommendation, &pResults->action, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnCacheAcquireProgress( - __in IBootstrapperApplication* pBA, - __in BA_ONCACHEACQUIREPROGRESS_ARGS* pArgs, - __inout BA_ONCACHEACQUIREPROGRESS_RESULTS* pResults - ) -{ - return pBA->OnCacheAcquireProgress(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->dw64Progress, pArgs->dw64Total, pArgs->dwOverallPercentage, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnCacheAcquireResolving( - __in IBootstrapperApplication* pBA, - __in BA_ONCACHEACQUIRERESOLVING_ARGS* pArgs, - __inout BA_ONCACHEACQUIRERESOLVING_RESULTS* pResults - ) -{ - return pBA->OnCacheAcquireResolving(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->rgSearchPaths, pArgs->cSearchPaths, pArgs->fFoundLocal, pArgs->dwRecommendedSearchPath, pArgs->wzDownloadUrl, pArgs->wzPayloadContainerId, pArgs->recommendation, &pResults->dwChosenSearchPath, &pResults->action, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnCacheAcquireComplete( - __in IBootstrapperApplication* pBA, - __in BA_ONCACHEACQUIRECOMPLETE_ARGS* pArgs, - __inout BA_ONCACHEACQUIRECOMPLETE_RESULTS* pResults - ) -{ - return pBA->OnCacheAcquireComplete(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->hrStatus, pArgs->recommendation, &pResults->action); -} - -static HRESULT BalBaseBAProcOnCacheVerifyBegin( - __in IBootstrapperApplication* pBA, - __in BA_ONCACHEVERIFYBEGIN_ARGS* pArgs, - __inout BA_ONCACHEVERIFYBEGIN_RESULTS* pResults - ) -{ - return pBA->OnCacheVerifyBegin(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnCacheVerifyProgress( - __in IBootstrapperApplication* pBA, - __in BA_ONCACHEVERIFYPROGRESS_ARGS* pArgs, - __inout BA_ONCACHEVERIFYPROGRESS_RESULTS* pResults - ) -{ - return pBA->OnCacheVerifyProgress(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->dw64Progress, pArgs->dw64Total, pArgs->dwOverallPercentage, pArgs->verifyStep, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnCacheVerifyComplete( - __in IBootstrapperApplication* pBA, - __in BA_ONCACHEVERIFYCOMPLETE_ARGS* pArgs, - __inout BA_ONCACHEVERIFYCOMPLETE_RESULTS* pResults - ) -{ - return pBA->OnCacheVerifyComplete(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->hrStatus, pArgs->recommendation, &pResults->action); -} - -static HRESULT BalBaseBAProcOnCachePackageComplete( - __in IBootstrapperApplication* pBA, - __in BA_ONCACHEPACKAGECOMPLETE_ARGS* pArgs, - __inout BA_ONCACHEPACKAGECOMPLETE_RESULTS* pResults - ) -{ - return pBA->OnCachePackageComplete(pArgs->wzPackageId, pArgs->hrStatus, pArgs->recommendation, &pResults->action); -} - -static HRESULT BalBaseBAProcOnCacheComplete( - __in IBootstrapperApplication* pBA, - __in BA_ONCACHECOMPLETE_ARGS* pArgs, - __inout BA_ONCACHECOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBA->OnCacheComplete(pArgs->hrStatus); -} - -static HRESULT BalBaseBAProcOnExecuteBegin( - __in IBootstrapperApplication* pBA, - __in BA_ONEXECUTEBEGIN_ARGS* pArgs, - __inout BA_ONEXECUTEBEGIN_RESULTS* pResults - ) -{ - return pBA->OnExecuteBegin(pArgs->cExecutingPackages, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnExecutePackageBegin( - __in IBootstrapperApplication* pBA, - __in BA_ONEXECUTEPACKAGEBEGIN_ARGS* pArgs, - __inout BA_ONEXECUTEPACKAGEBEGIN_RESULTS* pResults - ) -{ - return pBA->OnExecutePackageBegin(pArgs->wzPackageId, pArgs->fExecute, pArgs->action, pArgs->uiLevel, pArgs->fDisableExternalUiHandler, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnExecutePatchTarget( - __in IBootstrapperApplication* pBA, - __in BA_ONEXECUTEPATCHTARGET_ARGS* pArgs, - __inout BA_ONEXECUTEPATCHTARGET_RESULTS* pResults - ) -{ - return pBA->OnExecutePatchTarget(pArgs->wzPackageId, pArgs->wzTargetProductCode, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnExecuteProgress( - __in IBootstrapperApplication* pBA, - __in BA_ONEXECUTEPROGRESS_ARGS* pArgs, - __inout BA_ONEXECUTEPROGRESS_RESULTS* pResults - ) -{ - return pBA->OnExecuteProgress(pArgs->wzPackageId, pArgs->dwProgressPercentage, pArgs->dwOverallPercentage, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnExecuteMsiMessage( - __in IBootstrapperApplication* pBA, - __in BA_ONEXECUTEMSIMESSAGE_ARGS* pArgs, - __inout BA_ONEXECUTEMSIMESSAGE_RESULTS* pResults - ) -{ - return pBA->OnExecuteMsiMessage(pArgs->wzPackageId, pArgs->messageType, pArgs->dwUIHint, pArgs->wzMessage, pArgs->cData, pArgs->rgwzData, pArgs->nRecommendation, &pResults->nResult); -} - -static HRESULT BalBaseBAProcOnExecuteFilesInUse( - __in IBootstrapperApplication* pBA, - __in BA_ONEXECUTEFILESINUSE_ARGS* pArgs, - __inout BA_ONEXECUTEFILESINUSE_RESULTS* pResults - ) -{ - return pBA->OnExecuteFilesInUse(pArgs->wzPackageId, pArgs->cFiles, pArgs->rgwzFiles, pArgs->nRecommendation, pArgs->source, &pResults->nResult); -} - -static HRESULT BalBaseBAProcOnExecutePackageComplete( - __in IBootstrapperApplication* pBA, - __in BA_ONEXECUTEPACKAGECOMPLETE_ARGS* pArgs, - __inout BA_ONEXECUTEPACKAGECOMPLETE_RESULTS* pResults - ) -{ - return pBA->OnExecutePackageComplete(pArgs->wzPackageId, pArgs->hrStatus, pArgs->restart, pArgs->recommendation, &pResults->action); -} - -static HRESULT BalBaseBAProcOnExecuteProcessCancel( - __in IBootstrapperApplication* pBA, - __in BA_ONEXECUTEPROCESSCANCEL_ARGS* pArgs, - __inout BA_ONEXECUTEPROCESSCANCEL_RESULTS* pResults - ) -{ - return pBA->OnExecuteProcessCancel(pArgs->wzPackageId, pArgs->dwProcessId, pArgs->recommendation, &pResults->action); -} - -static HRESULT BalBaseBAProcOnExecuteComplete( - __in IBootstrapperApplication* pBA, - __in BA_ONEXECUTECOMPLETE_ARGS* pArgs, - __inout BA_ONEXECUTECOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBA->OnExecuteComplete(pArgs->hrStatus); -} - -static HRESULT BalBaseBAProcOnUnregisterBegin( - __in IBootstrapperApplication* pBA, - __in BA_ONUNREGISTERBEGIN_ARGS* pArgs, - __inout BA_ONUNREGISTERBEGIN_RESULTS* pResults - ) -{ - return pBA->OnUnregisterBegin(pArgs->recommendedRegistrationType, &pResults->registrationType); -} - -static HRESULT BalBaseBAProcOnUnregisterComplete( - __in IBootstrapperApplication* pBA, - __in BA_ONUNREGISTERCOMPLETE_ARGS* pArgs, - __inout BA_ONUNREGISTERCOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBA->OnUnregisterComplete(pArgs->hrStatus); -} - -static HRESULT BalBaseBAProcOnApplyComplete( - __in IBootstrapperApplication* pBA, - __in BA_ONAPPLYCOMPLETE_ARGS* pArgs, - __inout BA_ONAPPLYCOMPLETE_RESULTS* pResults - ) -{ - return pBA->OnApplyComplete(pArgs->hrStatus, pArgs->restart, pArgs->recommendation, &pResults->action); -} - -static HRESULT BalBaseBAProcOnLaunchApprovedExeBegin( - __in IBootstrapperApplication* pBA, - __in BA_ONLAUNCHAPPROVEDEXEBEGIN_ARGS* /*pArgs*/, - __inout BA_ONLAUNCHAPPROVEDEXEBEGIN_RESULTS* pResults - ) -{ - return pBA->OnLaunchApprovedExeBegin(&pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnLaunchApprovedExeComplete( - __in IBootstrapperApplication* pBA, - __in BA_ONLAUNCHAPPROVEDEXECOMPLETE_ARGS* pArgs, - __inout BA_ONLAUNCHAPPROVEDEXECOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBA->OnLaunchApprovedExeComplete(pArgs->hrStatus, pArgs->dwProcessId); -} - -static HRESULT BalBaseBAProcOnPlanMsiPackage( - __in IBootstrapperApplication* pBA, - __in BA_ONPLANMSIPACKAGE_ARGS* pArgs, - __inout BA_ONPLANMSIPACKAGE_RESULTS* pResults - ) -{ - return pBA->OnPlanMsiPackage(pArgs->wzPackageId, pArgs->fExecute, pArgs->action, pArgs->recommendedFileVersioning, &pResults->fCancel, &pResults->actionMsiProperty, &pResults->uiLevel, &pResults->fDisableExternalUiHandler, &pResults->fileVersioning); -} - -static HRESULT BalBaseBAProcOnBeginMsiTransactionBegin( - __in IBootstrapperApplication* pBA, - __in BA_ONBEGINMSITRANSACTIONBEGIN_ARGS* pArgs, - __inout BA_ONBEGINMSITRANSACTIONBEGIN_RESULTS* pResults - ) -{ - return pBA->OnBeginMsiTransactionBegin(pArgs->wzTransactionId, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnBeginMsiTransactionComplete( - __in IBootstrapperApplication* pBA, - __in BA_ONBEGINMSITRANSACTIONCOMPLETE_ARGS* pArgs, - __inout BA_ONBEGINMSITRANSACTIONCOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBA->OnBeginMsiTransactionComplete(pArgs->wzTransactionId, pArgs->hrStatus); -} - -static HRESULT BalBaseBAProcOnCommitMsiTransactionBegin( - __in IBootstrapperApplication* pBA, - __in BA_ONCOMMITMSITRANSACTIONBEGIN_ARGS* pArgs, - __inout BA_ONCOMMITMSITRANSACTIONBEGIN_RESULTS* pResults - ) -{ - return pBA->OnCommitMsiTransactionBegin(pArgs->wzTransactionId, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnCommitMsiTransactionComplete( - __in IBootstrapperApplication* pBA, - __in BA_ONCOMMITMSITRANSACTIONCOMPLETE_ARGS* pArgs, - __inout BA_ONCOMMITMSITRANSACTIONCOMPLETE_RESULTS* pResults - ) -{ - return pBA->OnCommitMsiTransactionComplete(pArgs->wzTransactionId, pArgs->hrStatus, pArgs->restart, pArgs->recommendation, &pResults->action); -} - -static HRESULT BalBaseBAProcOnRollbackMsiTransactionBegin( - __in IBootstrapperApplication* pBA, - __in BA_ONROLLBACKMSITRANSACTIONBEGIN_ARGS* pArgs, - __inout BA_ONROLLBACKMSITRANSACTIONBEGIN_RESULTS* /*pResults*/ - ) -{ - return pBA->OnRollbackMsiTransactionBegin(pArgs->wzTransactionId); -} - -static HRESULT BalBaseBAProcOnRollbackMsiTransactionComplete( - __in IBootstrapperApplication* pBA, - __in BA_ONROLLBACKMSITRANSACTIONCOMPLETE_ARGS* pArgs, - __inout BA_ONROLLBACKMSITRANSACTIONCOMPLETE_RESULTS* pResults - ) -{ - return pBA->OnRollbackMsiTransactionComplete(pArgs->wzTransactionId, pArgs->hrStatus, pArgs->restart, pArgs->recommendation, &pResults->action); -} - -static HRESULT BalBaseBAProcOnPauseAutomaticUpdatesBegin( - __in IBootstrapperApplication* pBA, - __in BA_ONPAUSEAUTOMATICUPDATESBEGIN_ARGS* /*pArgs*/, - __inout BA_ONPAUSEAUTOMATICUPDATESBEGIN_RESULTS* /*pResults*/ - ) -{ - return pBA->OnPauseAutomaticUpdatesBegin(); -} - -static HRESULT BalBaseBAProcOnPauseAutomaticUpdatesComplete( - __in IBootstrapperApplication* pBA, - __in BA_ONPAUSEAUTOMATICUPDATESCOMPLETE_ARGS* pArgs, - __inout BA_ONPAUSEAUTOMATICUPDATESCOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBA->OnPauseAutomaticUpdatesComplete(pArgs->hrStatus); -} - -static HRESULT BalBaseBAProcOnSystemRestorePointBegin( - __in IBootstrapperApplication* pBA, - __in BA_ONSYSTEMRESTOREPOINTBEGIN_ARGS* /*pArgs*/, - __inout BA_ONSYSTEMRESTOREPOINTBEGIN_RESULTS* /*pResults*/ - ) -{ - return pBA->OnSystemRestorePointBegin(); -} - -static HRESULT BalBaseBAProcOnSystemRestorePointComplete( - __in IBootstrapperApplication* pBA, - __in BA_ONSYSTEMRESTOREPOINTCOMPLETE_ARGS* pArgs, - __inout BA_ONSYSTEMRESTOREPOINTCOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBA->OnSystemRestorePointComplete(pArgs->hrStatus); -} - -static HRESULT BalBaseBAProcOnPlanForwardCompatibleBundle( - __in IBootstrapperApplication* pBA, - __in BA_ONPLANFORWARDCOMPATIBLEBUNDLE_ARGS* pArgs, - __inout BA_ONPLANFORWARDCOMPATIBLEBUNDLE_RESULTS* pResults - ) -{ - return pBA->OnPlanForwardCompatibleBundle(pArgs->wzBundleId, pArgs->relationType, pArgs->wzBundleTag, pArgs->fPerMachine, pArgs->wzVersion, pArgs->fRecommendedIgnoreBundle, &pResults->fCancel, &pResults->fIgnoreBundle); -} - -static HRESULT BalBaseBAProcOnCacheContainerOrPayloadVerifyBegin( - __in IBootstrapperApplication* pBA, - __in BA_ONCACHECONTAINERORPAYLOADVERIFYBEGIN_ARGS* pArgs, - __inout BA_ONCACHECONTAINERORPAYLOADVERIFYBEGIN_RESULTS* pResults - ) -{ - return pBA->OnCacheContainerOrPayloadVerifyBegin(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnCacheContainerOrPayloadVerifyProgress( - __in IBootstrapperApplication* pBA, - __in BA_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS_ARGS* pArgs, - __inout BA_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS_RESULTS* pResults - ) -{ - return pBA->OnCacheContainerOrPayloadVerifyProgress(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->dw64Progress, pArgs->dw64Total, pArgs->dwOverallPercentage, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnCacheContainerOrPayloadVerifyComplete( - __in IBootstrapperApplication* pBA, - __in BA_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE_ARGS* pArgs, - __inout BA_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBA->OnCacheContainerOrPayloadVerifyComplete(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->hrStatus); -} - -static HRESULT BalBaseBAProcOnCachePayloadExtractBegin( - __in IBootstrapperApplication* pBA, - __in BA_ONCACHEPAYLOADEXTRACTBEGIN_ARGS* pArgs, - __inout BA_ONCACHEPAYLOADEXTRACTBEGIN_RESULTS* pResults - ) -{ - return pBA->OnCachePayloadExtractBegin(pArgs->wzContainerId, pArgs->wzPayloadId, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnCachePayloadExtractProgress( - __in IBootstrapperApplication* pBA, - __in BA_ONCACHEPAYLOADEXTRACTPROGRESS_ARGS* pArgs, - __inout BA_ONCACHEPAYLOADEXTRACTPROGRESS_RESULTS* pResults - ) -{ - return pBA->OnCachePayloadExtractProgress(pArgs->wzContainerId, pArgs->wzPayloadId, pArgs->dw64Progress, pArgs->dw64Total, pArgs->dwOverallPercentage, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnCachePayloadExtractComplete( - __in IBootstrapperApplication* pBA, - __in BA_ONCACHEPAYLOADEXTRACTCOMPLETE_ARGS* pArgs, - __inout BA_ONCACHEPAYLOADEXTRACTCOMPLETE_RESULTS* /*pResults*/ - ) -{ - return pBA->OnCachePayloadExtractComplete(pArgs->wzContainerId, pArgs->wzPayloadId, pArgs->hrStatus); -} - -static HRESULT BalBaseBAProcOnPlanRestoreRelatedBundle( - __in IBootstrapperApplication* pBA, - __in BA_ONPLANRESTORERELATEDBUNDLE_ARGS* pArgs, - __inout BA_ONPLANRESTORERELATEDBUNDLE_RESULTS* pResults - ) -{ - return pBA->OnPlanRestoreRelatedBundle(pArgs->wzBundleId, pArgs->recommendedState, &pResults->requestedState, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnPlanRelatedBundleType( - __in IBootstrapperApplication* pBA, - __in BA_ONPLANRELATEDBUNDLETYPE_ARGS* pArgs, - __inout BA_ONPLANRELATEDBUNDLETYPE_RESULTS* pResults - ) -{ - return pBA->OnPlanRelatedBundleType(pArgs->wzBundleId, pArgs->recommendedType, &pResults->requestedType, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnApplyDowngrade( - __in IBootstrapperApplication* pBA, - __in BA_ONAPPLYDOWNGRADE_ARGS* pArgs, - __inout BA_ONAPPLYDOWNGRADE_RESULTS* pResults - ) -{ - return pBA->OnApplyDowngrade(pArgs->hrRecommended, &pResults->hrStatus); -} - -static HRESULT BalBaseBAProcOnDetectRelatedBundlePackage( - __in IBootstrapperApplication* pBA, - __in BA_ONDETECTRELATEDBUNDLEPACKAGE_ARGS* pArgs, - __inout BA_ONDETECTRELATEDBUNDLEPACKAGE_RESULTS* pResults - ) -{ - return pBA->OnDetectRelatedBundlePackage(pArgs->wzPackageId, pArgs->wzBundleId, pArgs->relationType, pArgs->fPerMachine, pArgs->wzVersion, &pResults->fCancel); -} - -static HRESULT BalBaseBAProcOnCachePackageNonVitalValidationFailure( - __in IBootstrapperApplication* pBA, - __in BA_ONCACHEPACKAGENONVITALVALIDATIONFAILURE_ARGS* pArgs, - __inout BA_ONCACHEPACKAGENONVITALVALIDATIONFAILURE_RESULTS* pResults - ) -{ - return pBA->OnCachePackageNonVitalValidationFailure(pArgs->wzPackageId, pArgs->hrStatus, pArgs->recommendation, &pResults->action); -} - -HRESULT WINAPI BalBaseBootstrapperApplicationProc( - __in IBootstrapperApplication* pBA, - __in BOOTSTRAPPER_APPLICATION_MESSAGE message, - __in const LPVOID pvArgs, - __inout LPVOID pvResults - ) -{ - HRESULT hr = pBA->BAProc(message, pvArgs, pvResults); - - if (E_NOTIMPL == hr) - { - switch (message) - { - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTBEGIN: - hr = BalBaseBAProcOnDetectBegin(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTCOMPLETE: - hr = BalBaseBAProcOnDetectComplete(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANBEGIN: - hr = BalBaseBAProcOnPlanBegin(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPLETE: - hr = BalBaseBAProcOnPlanComplete(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONSTARTUP: - hr = BalBaseBAProcOnStartup(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONSHUTDOWN: - hr = BalBaseBAProcOnShutdown(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE: - hr = BalBaseBAProcOnDetectForwardCompatibleBundle(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATEBEGIN: - hr = BalBaseBAProcOnDetectUpdateBegin(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATE: - hr = BalBaseBAProcOnDetectUpdate(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATECOMPLETE: - hr = BalBaseBAProcOnDetectUpdateComplete(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDBUNDLE: - hr = BalBaseBAProcOnDetectRelatedBundle(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPACKAGEBEGIN: - hr = BalBaseBAProcOnDetectPackageBegin(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDMSIPACKAGE: - hr = BalBaseBAProcOnDetectRelatedMsiPackage(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPATCHTARGET: - hr = BalBaseBAProcOnDetectPatchTarget(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTMSIFEATURE: - hr = BalBaseBAProcOnDetectMsiFeature(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPACKAGECOMPLETE: - hr = BalBaseBAProcOnDetectPackageComplete(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRELATEDBUNDLE: - hr = BalBaseBAProcOnPlanRelatedBundle(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPACKAGEBEGIN: - hr = BalBaseBAProcOnPlanPackageBegin(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPATCHTARGET: - hr = BalBaseBAProcOnPlanPatchTarget(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANMSIFEATURE: - hr = BalBaseBAProcOnPlanMsiFeature(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPACKAGECOMPLETE: - hr = BalBaseBAProcOnPlanPackageComplete(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYBEGIN: - hr = BalBaseBAProcOnApplyBegin(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONELEVATEBEGIN: - hr = BalBaseBAProcOnElevateBegin(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONELEVATECOMPLETE: - hr = BalBaseBAProcOnElevateComplete(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPROGRESS: - hr = BalBaseBAProcOnProgress(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONERROR: - hr = BalBaseBAProcOnError(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONREGISTERBEGIN: - hr = BalBaseBAProcOnRegisterBegin(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONREGISTERCOMPLETE: - hr = BalBaseBAProcOnRegisterComplete(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEBEGIN: - hr = BalBaseBAProcOnCacheBegin(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGEBEGIN: - hr = BalBaseBAProcOnCachePackageBegin(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREBEGIN: - hr = BalBaseBAProcOnCacheAcquireBegin(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREPROGRESS: - hr = BalBaseBAProcOnCacheAcquireProgress(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIRERESOLVING: - hr = BalBaseBAProcOnCacheAcquireResolving(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIRECOMPLETE: - hr = BalBaseBAProcOnCacheAcquireComplete(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYBEGIN: - hr = BalBaseBAProcOnCacheVerifyBegin(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYPROGRESS: - hr = BalBaseBAProcOnCacheVerifyProgress(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYCOMPLETE: - hr = BalBaseBAProcOnCacheVerifyComplete(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGECOMPLETE: - hr = BalBaseBAProcOnCachePackageComplete(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECOMPLETE: - hr = BalBaseBAProcOnCacheComplete(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEBEGIN: - hr = BalBaseBAProcOnExecuteBegin(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPACKAGEBEGIN: - hr = BalBaseBAProcOnExecutePackageBegin(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPATCHTARGET: - hr = BalBaseBAProcOnExecutePatchTarget(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPROGRESS: - hr = BalBaseBAProcOnExecuteProgress(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEMSIMESSAGE: - hr = BalBaseBAProcOnExecuteMsiMessage(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEFILESINUSE: - hr = BalBaseBAProcOnExecuteFilesInUse(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPACKAGECOMPLETE: - hr = BalBaseBAProcOnExecutePackageComplete(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTECOMPLETE: - hr = BalBaseBAProcOnExecuteComplete(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONUNREGISTERBEGIN: - hr = BalBaseBAProcOnUnregisterBegin(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONUNREGISTERCOMPLETE: - hr = BalBaseBAProcOnUnregisterComplete(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYCOMPLETE: - hr = BalBaseBAProcOnApplyComplete(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONLAUNCHAPPROVEDEXEBEGIN: - hr = BalBaseBAProcOnLaunchApprovedExeBegin(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONLAUNCHAPPROVEDEXECOMPLETE: - hr = BalBaseBAProcOnLaunchApprovedExeComplete(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANMSIPACKAGE: - hr = BalBaseBAProcOnPlanMsiPackage(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONBEGINMSITRANSACTIONBEGIN: - hr = BalBaseBAProcOnBeginMsiTransactionBegin(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONBEGINMSITRANSACTIONCOMPLETE: - hr = BalBaseBAProcOnBeginMsiTransactionComplete(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCOMMITMSITRANSACTIONBEGIN: - hr = BalBaseBAProcOnCommitMsiTransactionBegin(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCOMMITMSITRANSACTIONCOMPLETE: - hr = BalBaseBAProcOnCommitMsiTransactionComplete(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONROLLBACKMSITRANSACTIONBEGIN: - hr = BalBaseBAProcOnRollbackMsiTransactionBegin(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONROLLBACKMSITRANSACTIONCOMPLETE: - hr = BalBaseBAProcOnRollbackMsiTransactionComplete(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPAUSEAUTOMATICUPDATESBEGIN: - hr = BalBaseBAProcOnPauseAutomaticUpdatesBegin(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPAUSEAUTOMATICUPDATESCOMPLETE: - hr = BalBaseBAProcOnPauseAutomaticUpdatesComplete(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMRESTOREPOINTBEGIN: - hr = BalBaseBAProcOnSystemRestorePointBegin(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMRESTOREPOINTCOMPLETE: - hr = BalBaseBAProcOnSystemRestorePointComplete(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANNEDPACKAGE: - hr = BalBaseBAProcOnPlannedPackage(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANFORWARDCOMPATIBLEBUNDLE: - hr = BalBaseBAProcOnPlanForwardCompatibleBundle(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYBEGIN: - hr = BalBaseBAProcOnCacheContainerOrPayloadVerifyBegin(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS: - hr = BalBaseBAProcOnCacheContainerOrPayloadVerifyProgress(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE: - hr = BalBaseBAProcOnCacheContainerOrPayloadVerifyComplete(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTBEGIN: - hr = BalBaseBAProcOnCachePayloadExtractBegin(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTPROGRESS: - hr = BalBaseBAProcOnCachePayloadExtractProgress(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTCOMPLETE: - hr = BalBaseBAProcOnCachePayloadExtractComplete(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANROLLBACKBOUNDARY: - hr = BalBaseBAProcOnPlanRollbackBoundary(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTCOMPATIBLEMSIPACKAGE: - hr = BalBaseBAProcOnDetectCompatiblePackage(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGEBEGIN: - hr = BalBaseBAProcOnPlanCompatibleMsiPackageBegin(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE: - hr = BalBaseBAProcOnPlanCompatibleMsiPackageComplete(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANNEDCOMPATIBLEPACKAGE: - hr = BalBaseBAProcOnPlannedCompatiblePackage(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRESTORERELATEDBUNDLE: - hr = BalBaseBAProcOnPlanRestoreRelatedBundle(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRELATEDBUNDLETYPE: - hr = BalBaseBAProcOnPlanRelatedBundleType(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYDOWNGRADE: - hr = BalBaseBAProcOnApplyDowngrade(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPROCESSCANCEL: - hr = BalBaseBAProcOnExecuteProcessCancel(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDBUNDLEPACKAGE: - hr = BalBaseBAProcOnDetectRelatedBundlePackage(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGENONVITALVALIDATIONFAILURE: - hr = BalBaseBAProcOnCachePackageNonVitalValidationFailure(pBA, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - } - } - - pBA->BAProcFallback(message, pvArgs, pvResults, &hr); - - return hr; -} - -#endif diff --git a/src/api/burn/mbanative/mbanative.cpp b/src/api/burn/mbanative/mbanative.cpp deleted file mode 100644 index 84f605263..000000000 --- a/src/api/burn/mbanative/mbanative.cpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -#include "precomp.h" - -#if TODO_DELETE - -// #include "BalBaseBootstrapperApplicationProc.h" - -// extern "C" HRESULT WINAPI InitializeFromCreateArgs( -// __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, -// __inout BOOTSTRAPPER_COMMAND* pCommand, -// __out IBootstrapperEngine** ppEngine -// ) -// { -// HRESULT hr = S_OK; - -// hr = BalInitializeFromCreateArgs(pArgs, ppEngine); -// ExitOnFailure(hr, "Failed to initialize Bal."); - -// memcpy_s(pCommand, pCommand->cbSize, pArgs->pCommand, min(pArgs->pCommand->cbSize, pCommand->cbSize)); -// LExit: -// return hr; -// } - -// extern "C" void WINAPI StoreBAInCreateResults( -// __inout BOOTSTRAPPER_CREATE_RESULTS* pResults, -// __in IBootstrapperApplication* pBA -// ) -// { -// pResults->pfnBootstrapperApplicationProc = BalBaseBootstrapperApplicationProc; -// pResults->pvBootstrapperApplicationProcContext = pBA; -// } - -#endif diff --git a/src/api/burn/mbanative/mbanative.vcxproj b/src/api/burn/mbanative/mbanative.vcxproj index 47d095919..a1f79f4d2 100644 --- a/src/api/burn/mbanative/mbanative.vcxproj +++ b/src/api/burn/mbanative/mbanative.vcxproj @@ -46,7 +46,6 @@ - Create diff --git a/src/burn/engine/apply.cpp b/src/burn/engine/apply.cpp index 9ded6bd48..6908e9558 100644 --- a/src/burn/engine/apply.cpp +++ b/src/burn/engine/apply.cpp @@ -1433,17 +1433,8 @@ static HRESULT LayoutBundle( progress.pCacheContext = pContext; - hr = VariableGetString(pContext->pVariables, BURN_BUNDLE_SOURCE_PROCESS_PATH, &sczBundlePath); - if (FAILED(hr)) - { - if (E_NOTFOUND != hr) - { - ExitOnFailure(hr, "Failed to get path to bundle source process path to layout."); - } - - hr = PathForCurrentProcess(&sczBundlePath, NULL); - ExitOnFailure(hr, "Failed to get path to bundle to layout."); - } + hr = PathForCurrentProcess(&sczBundlePath, NULL); + ExitOnFailure(hr, "Failed to get path to bundle to layout."); hr = PathConcatRelativeToFullyQualifiedBase(pContext->wzLayoutDirectory, wzExecutableName, &sczDestinationPath); ExitOnFailure(hr, "Failed to concat layout path for bundle."); diff --git a/src/burn/engine/cache.cpp b/src/burn/engine/cache.cpp index 547a61a91..c0ac3ecde 100644 --- a/src/burn/engine/cache.cpp +++ b/src/burn/engine/cache.cpp @@ -2,7 +2,6 @@ #include "precomp.h" -static const LPCWSTR BUNDLE_CLEAN_ROOM_WORKING_FOLDER_NAME = L".cr"; static const LPCWSTR BUNDLE_WORKING_FOLDER_NAME = L".be"; static const LPCWSTR UNVERIFIED_CACHE_FOLDER_NAME = L".unverified"; static const LPCWSTR PACKAGE_CACHE_FOLDER_NAME = L"Package Cache"; @@ -242,8 +241,7 @@ extern "C" HRESULT CacheInitialize( extern "C" HRESULT CacheInitializeSources( __in BURN_CACHE* pCache, __in BURN_REGISTRATION* pRegistration, - __in BURN_VARIABLES* pVariables, - __in BURN_ENGINE_COMMAND* pInternalCommand + __in BURN_VARIABLES* pVariables ) { Assert(!pCache->fInitializedCacheSources); @@ -255,7 +253,6 @@ extern "C" HRESULT CacheInitializeSources( LPWSTR sczOriginalSource = NULL; LPWSTR sczOriginalSourceFolder = NULL; BOOL fPathEqual = FALSE; - LPCWSTR wzSourceProcessPath = pInternalCommand->sczSourceProcessPath; hr = PathForCurrentProcess(&sczCurrentPath, NULL); ExitOnFailure(hr, "Failed to get current process path."); @@ -272,15 +269,7 @@ extern "C" HRESULT CacheInitializeSources( pCache->fRunningFromCache = fPathEqual; - // If a source process path was not provided (e.g. we are not being - // run in a clean room) then use the current process path as the - // source process path. - if (!wzSourceProcessPath) - { - wzSourceProcessPath = sczCurrentPath; - } - - hr = PathGetDirectory(wzSourceProcessPath, &pCache->sczSourceProcessFolder); + hr = PathGetDirectory(sczCurrentPath, &pCache->sczSourceProcessFolder); ExitOnFailure(hr, "Failed to initialize cache source folder."); // If we're not running from the cache, ensure the original source is set. @@ -288,15 +277,14 @@ extern "C" HRESULT CacheInitializeSources( { // If the original source has not been set already then set it where the bundle is // running from right now. This value will be persisted and we'll use it when launched - // from the clean room or package cache since none of our packages will be relative to - // those locations. + // from the package cache since none of our packages will be relative to those locations. hr = VariableGetString(pVariables, BURN_BUNDLE_ORIGINAL_SOURCE, &sczOriginalSource); if (E_NOTFOUND == hr) { - hr = VariableSetString(pVariables, BURN_BUNDLE_ORIGINAL_SOURCE, wzSourceProcessPath, FALSE, FALSE); + hr = VariableSetString(pVariables, BURN_BUNDLE_ORIGINAL_SOURCE, sczCurrentPath, FALSE, FALSE); ExitOnFailure(hr, "Failed to set original source variable."); - hr = StrAllocString(&sczOriginalSource, wzSourceProcessPath, 0); + hr = StrAllocString(&sczOriginalSource, sczCurrentPath, 0); ExitOnFailure(hr, "Failed to copy current path to original source."); } diff --git a/src/burn/engine/cache.h b/src/burn/engine/cache.h index cd7c1f163..3f0ba749d 100644 --- a/src/burn/engine/cache.h +++ b/src/burn/engine/cache.h @@ -90,8 +90,7 @@ HRESULT CacheInitialize( HRESULT CacheInitializeSources( __in BURN_CACHE* pCache, __in BURN_REGISTRATION* pRegistration, - __in BURN_VARIABLES* pVariables, - __in BURN_ENGINE_COMMAND* pInternalCommand + __in BURN_VARIABLES* pVariables ); HRESULT CacheEnsureAcquisitionFolder( __in BURN_CACHE* pCache diff --git a/src/burn/engine/core.cpp b/src/burn/engine/core.cpp index c5ff2813f..ae74fdfd0 100644 --- a/src/burn/engine/core.cpp +++ b/src/burn/engine/core.cpp @@ -43,11 +43,6 @@ static HRESULT EscapeAndAppendArgumentToCommandLineFormattedArgs( __in __format_string LPCWSTR wzFormat, __in va_list args ); -static HRESULT AppendLayoutToCommandLine( - __in BOOTSTRAPPER_ACTION action, - __in_z LPCWSTR wzLayoutDirectory, - __deref_inout_z LPWSTR* psczCommandLine - ); static HRESULT GetSanitizedCommandLine( __in BURN_ENGINE_COMMAND* pInternalCommand, __in BOOTSTRAPPER_COMMAND* pCommand, @@ -151,18 +146,6 @@ extern "C" HRESULT CoreInitialize( ExitOnFailure(hr, "Failed to overwrite the bundle active parent built-in variable."); } - if (pEngineState->internalCommand.sczSourceProcessPath) - { - hr = VariableSetString(&pEngineState->variables, BURN_BUNDLE_SOURCE_PROCESS_PATH, pEngineState->internalCommand.sczSourceProcessPath, TRUE, FALSE); - ExitOnFailure(hr, "Failed to set source process path variable."); - - hr = PathGetDirectory(pEngineState->internalCommand.sczSourceProcessPath, &sczSourceProcessFolder); - ExitOnFailure(hr, "Failed to get source process folder from path."); - - hr = VariableSetString(&pEngineState->variables, BURN_BUNDLE_SOURCE_PROCESS_FOLDER, sczSourceProcessFolder, TRUE, FALSE); - ExitOnFailure(hr, "Failed to set source process folder variable."); - } - // Set BURN_BUNDLE_ORIGINAL_SOURCE, if it was passed in on the command line. // Needs to be done after ManifestLoadXmlFromBuffer. if (pEngineState->internalCommand.sczOriginalSource) @@ -173,7 +156,7 @@ extern "C" HRESULT CoreInitialize( if (BURN_MODE_NORMAL == pEngineState->internalCommand.mode || BURN_MODE_EMBEDDED == pEngineState->internalCommand.mode) { - hr = CacheInitializeSources(&pEngineState->cache, &pEngineState->registration, &pEngineState->variables, &pEngineState->internalCommand); + hr = CacheInitializeSources(&pEngineState->cache, &pEngineState->registration, &pEngineState->variables); ExitOnFailure(hr, "Failed to initialize internal cache source functionality."); } @@ -1087,95 +1070,6 @@ static HRESULT CoreRecreateCommandLine( return hr; } -extern "C" HRESULT CoreCreateCleanRoomCommandLine( - __deref_inout_z LPWSTR* psczCommandLine, - __in BURN_ENGINE_STATE* pEngineState, - __in_z LPCWSTR wzCleanRoomBundlePath, - __in_z LPCWSTR wzCurrentProcessPath, - __inout HANDLE* phFileAttached, - __inout HANDLE* phFileSelf - ) -{ - HRESULT hr = S_OK; - BOOTSTRAPPER_COMMAND* pCommand = &pEngineState->command; - BURN_ENGINE_COMMAND* pInternalCommand = &pEngineState->internalCommand; - - // The clean room switch must always be at the front of the command line so - // the EngineInCleanRoom function will operate correctly. - hr = StrAllocFormatted(psczCommandLine, L"-%ls=\"%ls\"", BURN_COMMANDLINE_SWITCH_CLEAN_ROOM, wzCurrentProcessPath); - ExitOnFailure(hr, "Failed to allocate parameters for unelevated process."); - - // Send a file handle for the child Burn process to access the attached container. - hr = CoreAppendFileHandleAttachedToCommandLine(pEngineState->section.hEngineFile, phFileAttached, psczCommandLine); - ExitOnFailure(hr, "Failed to append %ls", BURN_COMMANDLINE_SWITCH_FILEHANDLE_ATTACHED); - - // Grab a file handle for the child Burn process. - hr = CoreAppendFileHandleSelfToCommandLine(wzCleanRoomBundlePath, phFileSelf, psczCommandLine, NULL); - ExitOnFailure(hr, "Failed to append %ls", BURN_COMMANDLINE_SWITCH_FILEHANDLE_SELF); - - hr = CoreAppendSplashScreenWindowToCommandLine(pCommand->hwndSplashScreen, psczCommandLine); - ExitOnFailure(hr, "Failed to append %ls", BURN_COMMANDLINE_SWITCH_SPLASH_SCREEN); - - if (pInternalCommand->sczLogFile) - { - LPCWSTR wzLogParameter = (BURN_LOGGING_ATTRIBUTE_EXTRADEBUG & pInternalCommand->dwLoggingAttributes) ? L"xlog" : L"log"; - hr = StrAllocConcatFormatted(psczCommandLine, L" /%ls", wzLogParameter); - ExitOnFailure(hr, "Failed to append logging switch."); - - hr = AppAppendCommandLineArgument(psczCommandLine, pInternalCommand->sczLogFile); - ExitOnFailure(hr, "Failed to append custom log path."); - } - - hr = AppendLayoutToCommandLine(pCommand->action, pCommand->wzLayoutDirectory, psczCommandLine); - ExitOnFailure(hr, "Failed to append layout."); - - switch (pInternalCommand->automaticUpdates) - { - case BURN_AU_PAUSE_ACTION_NONE: - hr = StrAllocConcat(psczCommandLine, L" /noaupause", 0); - ExitOnFailure(hr, "Failed to append /noaupause."); - break; - case BURN_AU_PAUSE_ACTION_IFELEVATED_NORESUME: - hr = StrAllocConcat(psczCommandLine, L" /keepaupaused", 0); - ExitOnFailure(hr, "Failed to append /keepaupaused."); - break; - } - - // TODO: This should only be added if it was enabled from the command line. - if (pInternalCommand->fDisableSystemRestore) - { - hr = StrAllocConcat(psczCommandLine, L" /disablesystemrestore", 0); - ExitOnFailure(hr, "Failed to append /disablesystemrestore."); - } - - if (pInternalCommand->sczOriginalSource) - { - hr = StrAllocConcat(psczCommandLine, L" /originalsource", 0); - ExitOnFailure(hr, "Failed to append /originalsource."); - - hr = AppAppendCommandLineArgument(psczCommandLine, pInternalCommand->sczOriginalSource); - ExitOnFailure(hr, "Failed to append original source."); - } - - if (pEngineState->embeddedConnection.sczName) - { - hr = StrAllocConcatFormatted(psczCommandLine, L" -%ls %ls %ls %u", BURN_COMMANDLINE_SWITCH_EMBEDDED, pEngineState->embeddedConnection.sczName, pEngineState->embeddedConnection.sczSecret, pEngineState->embeddedConnection.dwProcessId); - ExitOnFailure(hr, "Failed to allocate embedded command."); - } - - if (pInternalCommand->sczIgnoreDependencies) - { - hr = StrAllocConcatFormatted(psczCommandLine, L" /%ls=%ls", BURN_COMMANDLINE_SWITCH_IGNOREDEPENDENCIES, pInternalCommand->sczIgnoreDependencies); - ExitOnFailure(hr, "Failed to append ignored dependencies to command-line."); - } - - hr = CoreRecreateCommandLine(psczCommandLine, pCommand->action, pInternalCommand, pCommand, pCommand->relationType, pCommand->fPassthrough); - ExitOnFailure(hr, "Failed to recreate clean room command-line."); - -LExit: - return hr; -} - extern "C" HRESULT CoreCreatePassthroughBundleCommandLine( __deref_inout_z LPWSTR* psczCommandLine, __in BURN_ENGINE_COMMAND* pInternalCommand, @@ -1201,9 +1095,6 @@ extern "C" HRESULT CoreCreateResumeCommandLine( { HRESULT hr = S_OK; - hr = StrAllocFormatted(psczCommandLine, L"/%ls", BURN_COMMANDLINE_SWITCH_CLEAN_ROOM); - ExitOnFailure(hr, "Failed to alloc resume command-line."); - if (BURN_LOGGING_ATTRIBUTE_EXTRADEBUG & pPlan->pInternalCommand->dwLoggingAttributes) { hr = StrAllocConcatFormatted(psczCommandLine, L" /%ls=%ls", BURN_COMMANDLINE_SWITCH_LOG_MODE, L"x"); @@ -1694,40 +1585,6 @@ extern "C" HRESULT CoreParseCommandLine( i += 2; } - else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], lstrlenW(BURN_COMMANDLINE_SWITCH_CLEAN_ROOM), BURN_COMMANDLINE_SWITCH_CLEAN_ROOM, lstrlenW(BURN_COMMANDLINE_SWITCH_CLEAN_ROOM))) - { - if (0 != i) - { - fInvalidCommandLine = TRUE; - TraceLog(E_INVALIDARG, "Clean room command-line switch must be first argument on command-line."); - } - - if (BURN_MODE_UNKNOWN == pInternalCommand->mode) - { - pInternalCommand->mode = BURN_MODE_NORMAL; - } - else - { - fInvalidCommandLine = TRUE; - TraceLog(E_INVALIDARG, "Multiple mode command-line switches were provided."); - } - - // Get a pointer to the next character after the switch. - LPCWSTR wzParam = &argv[i][1 + lstrlenW(BURN_COMMANDLINE_SWITCH_CLEAN_ROOM)]; - if (L'\0' != wzParam[0]) - { - if (L'=' != wzParam[0]) - { - fInvalidCommandLine = TRUE; - TraceLog(E_INVALIDARG, "Invalid switch: %ls", argv[i]); - } - else if (L'\0' != wzParam[1]) - { - hr = PathExpand(&pInternalCommand->sczSourceProcessPath, wzParam + 1, PATH_EXPAND_FULLPATH); - ExitOnFailure(hr, "Failed to copy source process path."); - } - } - } else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], lstrlenW(BURN_COMMANDLINE_SWITCH_SYSTEM_COMPONENT), BURN_COMMANDLINE_SWITCH_SYSTEM_COMPONENT, lstrlenW(BURN_COMMANDLINE_SWITCH_SYSTEM_COMPONENT))) { // Get a pointer to the next character after the switch. @@ -1762,15 +1619,7 @@ extern "C" HRESULT CoreParseCommandLine( switch (pInternalCommand->mode) { case BURN_MODE_UNKNOWN: -#if TODO_DELETE - // Set mode to UNTRUSTED to ensure multiple modes weren't specified. - pInternalCommand->mode = BURN_MODE_UNTRUSTED; - break; -#endif case BURN_MODE_NORMAL: - // The initialization code already assumes that the - // clean room switch is at the beginning of the command line, - // so it's safe to assume that the mode is NORMAL in the clean room. pInternalCommand->mode = BURN_MODE_EMBEDDED; break; default: @@ -2014,9 +1863,6 @@ extern "C" HRESULT CoreParseCommandLine( if (BURN_MODE_UNKNOWN == pInternalCommand->mode) { -#if TODO_DELETE - pInternalCommand->mode = BURN_MODE_UNTRUSTED; -#endif pInternalCommand->mode = BURN_MODE_NORMAL; } @@ -2212,30 +2058,6 @@ static HRESULT EscapeAndAppendArgumentToCommandLineFormattedArgs( return hr; } -static HRESULT AppendLayoutToCommandLine( - __in BOOTSTRAPPER_ACTION action, - __in_z LPCWSTR wzLayoutDirectory, - __deref_inout_z LPWSTR* psczCommandLine - ) -{ - HRESULT hr = S_OK; - - if (BOOTSTRAPPER_ACTION_LAYOUT == action || wzLayoutDirectory) - { - hr = StrAllocConcat(psczCommandLine, L" /layout", 0); - ExitOnFailure(hr, "Failed to append layout switch."); - - if (wzLayoutDirectory) - { - hr = AppAppendCommandLineArgument(psczCommandLine, wzLayoutDirectory); - ExitOnFailure(hr, "Failed to append layout directory."); - } - } - -LExit: - return hr; -} - static HRESULT GetSanitizedCommandLine( __in BURN_ENGINE_COMMAND* pInternalCommand, __in BOOTSTRAPPER_COMMAND* pCommand, diff --git a/src/burn/engine/core.h b/src/burn/engine/core.h index 5109d76c3..787100b74 100644 --- a/src/burn/engine/core.h +++ b/src/burn/engine/core.h @@ -13,7 +13,6 @@ const LPCWSTR BURN_POLICY_REGISTRY_PATH = L"WiX\\Burn"; const LPCWSTR BURN_COMMANDLINE_SWITCH_PARENT = L"parent"; const LPCWSTR BURN_COMMANDLINE_SWITCH_PARENT_NONE = L"parent:none"; -const LPCWSTR BURN_COMMANDLINE_SWITCH_CLEAN_ROOM = L"burn.clean.room"; const LPCWSTR BURN_COMMANDLINE_SWITCH_WORKING_DIRECTORY = L"burn.engine.working.directory"; const LPCWSTR BURN_COMMANDLINE_SWITCH_ELEVATED = L"burn.elevated"; const LPCWSTR BURN_COMMANDLINE_SWITCH_EMBEDDED = L"burn.embedded"; @@ -47,8 +46,6 @@ const LPCWSTR BURN_BUNDLE_FORCED_RESTART_PACKAGE = L"WixBundleForcedRestartPacka const LPCWSTR BURN_BUNDLE_INSTALLED = L"WixBundleInstalled"; const LPCWSTR BURN_BUNDLE_ELEVATED = L"WixBundleElevated"; const LPCWSTR BURN_BUNDLE_PROVIDER_KEY = L"WixBundleProviderKey"; -const LPCWSTR BURN_BUNDLE_SOURCE_PROCESS_PATH = L"WixBundleSourceProcessPath"; -const LPCWSTR BURN_BUNDLE_SOURCE_PROCESS_FOLDER = L"WixBundleSourceProcessFolder"; const LPCWSTR BURN_BUNDLE_TAG = L"WixBundleTag"; const LPCWSTR BURN_BUNDLE_UILEVEL = L"WixBundleUILevel"; const LPCWSTR BURN_BUNDLE_VERSION = L"WixBundleVersion"; @@ -114,7 +111,6 @@ typedef struct _BURN_ENGINE_COMMAND LPWSTR sczAncestors; LPWSTR sczIgnoreDependencies; - LPWSTR sczSourceProcessPath; LPWSTR sczOriginalSource; LPWSTR sczEngineWorkingDirectory; @@ -271,14 +267,6 @@ HRESULT CoreSaveEngineState( LPCWSTR CoreRelationTypeToCommandLineString( __in BOOTSTRAPPER_RELATION_TYPE relationType ); -HRESULT CoreCreateCleanRoomCommandLine( - __deref_inout_z LPWSTR* psczCommandLine, - __in BURN_ENGINE_STATE* pEngineState, - __in_z LPCWSTR wzCleanRoomBundlePath, - __in_z LPCWSTR wzCurrentProcessPath, - __inout HANDLE* phFileAttached, - __inout HANDLE* phFileSelf - ); HRESULT CoreCreatePassthroughBundleCommandLine( __deref_inout_z LPWSTR* psczCommandLine, __in BURN_ENGINE_COMMAND* pInternalCommand, diff --git a/src/burn/engine/engine.cpp b/src/burn/engine/engine.cpp index d729b6b8c..9daa18a15 100644 --- a/src/burn/engine/engine.cpp +++ b/src/burn/engine/engine.cpp @@ -75,28 +75,6 @@ static void CALLBACK BurnTraceError( // function definitions -extern "C" BOOL EngineInCleanRoom( - __in_z_opt LPCWSTR wzCommandLine - ) -{ - // Be very careful with the functions you call from here. - // This function will be called before ::SetDefaultDllDirectories() - // has been called so dependencies outside of kernel32.dll are - // very likely to introduce DLL hijacking opportunities. - - static DWORD cchCleanRoomSwitch = lstrlenW(BURN_COMMANDLINE_SWITCH_CLEAN_ROOM); - - // This check is wholly dependent on the clean room command line switch being - // present at the beginning of the command line. Since Burn is the only thing - // that should be setting this command line option, that is in our control. - BOOL fInCleanRoom = (wzCommandLine && - (wzCommandLine[0] == L'-' || wzCommandLine[0] == L'/') && - CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, wzCommandLine + 1, cchCleanRoomSwitch, BURN_COMMANDLINE_SWITCH_CLEAN_ROOM, cchCleanRoomSwitch) - ); - - return fInCleanRoom; -} - extern "C" HRESULT EngineRun( __in HINSTANCE hInstance, __in HANDLE hEngineFile, @@ -466,7 +444,6 @@ static void UninitializeEngineState( ReleaseStr(pEngineState->internalCommand.sczIgnoreDependencies); ReleaseStr(pEngineState->internalCommand.sczLogFile); ReleaseStr(pEngineState->internalCommand.sczOriginalSource); - ReleaseStr(pEngineState->internalCommand.sczSourceProcessPath); ReleaseStr(pEngineState->internalCommand.sczEngineWorkingDirectory); ReleaseStr(pEngineState->log.sczExtension); @@ -480,84 +457,6 @@ static void UninitializeEngineState( memset(pEngineState, 0, sizeof(BURN_ENGINE_STATE)); } -#ifdef TODO_DELETE -static HRESULT RunUntrusted( - __in BURN_ENGINE_STATE* pEngineState - ) -{ - HRESULT hr = S_OK; - LPWSTR sczCurrentProcessPath = NULL; - LPWSTR wzCleanRoomBundlePath = NULL; - LPWSTR sczCachedCleanRoomBundlePath = NULL; - LPWSTR sczParameters = NULL; - LPWSTR sczFullCommandLine = NULL; - PROCESS_INFORMATION pi = { }; - HANDLE hFileAttached = NULL; - HANDLE hFileSelf = NULL; - HANDLE hProcess = NULL; - - // Initialize logging. - hr = LoggingOpen(&pEngineState->log, &pEngineState->internalCommand, &pEngineState->command, &pEngineState->variables, pEngineState->registration.sczDisplayName); - ExitOnFailure(hr, "Failed to open clean room log."); - - hr = PathForCurrentProcess(&sczCurrentProcessPath, NULL); - ExitOnFailure(hr, "Failed to get path for current process."); - - // If we're running from the package cache, we're in a secure - // folder (DLLs cannot be inserted here for hijacking purposes) - // so just launch the current process's path as the clean room - // process. Technically speaking, we'd be able to skip creating - // a clean room process at all (since we're already running from - // a secure folder) but it makes the code that only wants to run - // in clean room more complicated if we don't launch an explicit - // clean room process. - if (CacheBundleRunningFromCache(&pEngineState->cache)) - { - wzCleanRoomBundlePath = sczCurrentProcessPath; - } - else - { - hr = CacheBundleToCleanRoom(&pEngineState->cache, &pEngineState->section, &sczCachedCleanRoomBundlePath); - ExitOnFailure(hr, "Failed to cache to clean room."); - - wzCleanRoomBundlePath = sczCachedCleanRoomBundlePath; - } - - hr = CoreCreateCleanRoomCommandLine(&sczParameters, pEngineState, wzCleanRoomBundlePath, sczCurrentProcessPath, &hFileAttached, &hFileSelf); - ExitOnFailure(hr, "Failed to create clean room command-line."); - - hr = StrAllocFormattedSecure(&sczFullCommandLine, L"\"%ls\" %ls", wzCleanRoomBundlePath, sczParameters); - ExitOnFailure(hr, "Failed to allocate full command-line."); - - hr = CoreCreateProcess(wzCleanRoomBundlePath, sczFullCommandLine, TRUE, 0, NULL, static_cast(pEngineState->command.nCmdShow), &pi); - ExitOnFailure(hr, "Failed to launch clean room process: %ls", sczFullCommandLine); - - hProcess = pi.hProcess; - pi.hProcess = NULL; - - hr = ProcWaitForCompletion(hProcess, INFINITE, &pEngineState->userExperience.dwExitCode); - ExitOnFailure(hr, "Failed to wait for clean room process: %ls", wzCleanRoomBundlePath); - -LExit: - // If the splash screen is still around, close it. - if (::IsWindow(pEngineState->command.hwndSplashScreen)) - { - ::PostMessageW(pEngineState->command.hwndSplashScreen, WM_CLOSE, 0, 0); - } - - ReleaseHandle(pi.hThread); - ReleaseFileHandle(hFileSelf); - ReleaseFileHandle(hFileAttached); - ReleaseHandle(hProcess); - StrSecureZeroFreeString(sczFullCommandLine); - StrSecureZeroFreeString(sczParameters); - ReleaseStr(sczCachedCleanRoomBundlePath); - ReleaseStr(sczCurrentProcessPath); - - return hr; -} -#endif - static HRESULT RunNormal( __in HINSTANCE hInstance, __in BURN_ENGINE_STATE* pEngineState diff --git a/src/burn/engine/inc/engine.h b/src/burn/engine/inc/engine.h index 9b29dd84d..33d9e77bb 100644 --- a/src/burn/engine/inc/engine.h +++ b/src/burn/engine/inc/engine.h @@ -19,10 +19,6 @@ extern "C" { // function declarations -BOOL EngineInCleanRoom( - __in_z_opt LPCWSTR wzCommandLine - ); - HRESULT EngineRun( __in HINSTANCE hInstance, __in HANDLE hEngineFile, diff --git a/src/burn/engine/logging.cpp b/src/burn/engine/logging.cpp index 80df7a2e6..f381193f6 100644 --- a/src/burn/engine/logging.cpp +++ b/src/burn/engine/logging.cpp @@ -74,11 +74,6 @@ extern "C" HRESULT LoggingOpen( switch (pInternalCommand->mode) { -#if TODO_DELETE - case BURN_MODE_UNTRUSTED: - wzPostfix = L".cleanroom"; - break; -#endif case BURN_MODE_ELEVATED: wzPostfix = L".elevated"; break; @@ -1016,11 +1011,7 @@ static HRESULT InitializeLogging( // The untrusted process needs a separate log file. // TODO: Burn crashes if they do try to use the same log file. - if (pInternalCommand->sczLogFile -#if TODO_DELETE - && BURN_MODE_UNTRUSTED != pInternalCommand->mode -#endif - ) + if (pInternalCommand->sczLogFile) { hr = StrAllocString(&pLog->sczPath, pInternalCommand->sczLogFile, 0); ExitOnFailure(hr, "Failed to copy log file path from command line."); diff --git a/src/burn/engine/plan.cpp b/src/burn/engine/plan.cpp index 434bd432e..be281827b 100644 --- a/src/burn/engine/plan.cpp +++ b/src/burn/engine/plan.cpp @@ -441,15 +441,11 @@ extern "C" HRESULT PlanLayoutBundle( hr = VariableGetString(pVariables, BURN_BUNDLE_LAYOUT_DIRECTORY, &sczLayoutDirectory); if (E_NOTFOUND == hr) // if not set, use the current directory as the layout directory. { - hr = VariableGetString(pVariables, BURN_BUNDLE_SOURCE_PROCESS_FOLDER, &sczLayoutDirectory); - if (E_NOTFOUND == hr) // if not set, use the current directory as the layout directory. - { - hr = PathForCurrentProcess(&sczExecutablePath, NULL); - ExitOnFailure(hr, "Failed to get path for current executing process as layout directory."); + hr = PathForCurrentProcess(&sczExecutablePath, NULL); + ExitOnFailure(hr, "Failed to get path for current executing process as layout directory."); - hr = PathGetDirectory(sczExecutablePath, &sczLayoutDirectory); - ExitOnFailure(hr, "Failed to get executing process as layout directory."); - } + hr = PathGetDirectory(sczExecutablePath, &sczLayoutDirectory); + ExitOnFailure(hr, "Failed to get executing process as layout directory."); } ExitOnFailure(hr, "Failed to get bundle layout directory property."); diff --git a/src/burn/engine/registration.cpp b/src/burn/engine/registration.cpp index 01ed30d7f..fd8a32a48 100644 --- a/src/burn/engine/registration.cpp +++ b/src/burn/engine/registration.cpp @@ -299,7 +299,7 @@ extern "C" HRESULT RegistrationParseFromXml( } /******************************************************************* - RegistrationUninitialize - + RegistrationUninitialize - *******************************************************************/ extern "C" void RegistrationUninitialize( @@ -550,7 +550,7 @@ extern "C" HRESULT RegistrationDetectResumeType( } /******************************************************************* - RegistrationDetectRelatedBundles - finds the bundles with same + RegistrationDetectRelatedBundles - finds the bundles with same upgrade/detect/addon/patch codes. *******************************************************************/ @@ -761,7 +761,7 @@ extern "C" HRESULT RegistrationSessionBegin( else if (BURN_REGISTRATION_MODIFY_DISABLE_BUTTON != pRegistration->modify) // if support modify (aka: did not disable anything) { // ModifyPath: [path to exe] /modify - hr = RegWriteStringFormatted(hkRegistration, REGISTRY_BUNDLE_MODIFY_PATH, L"\"%ls\" /%ls /modify", pRegistration->sczCacheExecutablePath, BURN_COMMANDLINE_SWITCH_CLEAN_ROOM); + hr = RegWriteStringFormatted(hkRegistration, REGISTRY_BUNDLE_MODIFY_PATH, L"\"%ls\" /modify", pRegistration->sczCacheExecutablePath); ExitOnFailure(hr, "Failed to write %ls value.", REGISTRY_BUNDLE_MODIFY_PATH); // NoElevateOnModify: 1 @@ -793,14 +793,14 @@ extern "C" HRESULT RegistrationSessionBegin( } // QuietUninstallString: [path to exe] /uninstall /quiet - hr = RegWriteStringFormatted(hkRegistration, REGISTRY_BUNDLE_QUIET_UNINSTALL_STRING, L"\"%ls\" /%ls /uninstall /quiet", pRegistration->sczCacheExecutablePath, BURN_COMMANDLINE_SWITCH_CLEAN_ROOM); + hr = RegWriteStringFormatted(hkRegistration, REGISTRY_BUNDLE_QUIET_UNINSTALL_STRING, L"\"%ls\" /uninstall /quiet", pRegistration->sczCacheExecutablePath); ExitOnFailure(hr, "Failed to write %ls value.", REGISTRY_BUNDLE_QUIET_UNINSTALL_STRING); // UninstallString, [path to exe] // If the modify button is to be disabled, we'll add "/modify" to the uninstall string because the button is "Uninstall/Change". Otherwise, // it's just the "Uninstall" button so we add "/uninstall" to make the program just go away. LPCWSTR wzUninstallParameters = (BURN_REGISTRATION_MODIFY_DISABLE_BUTTON == pRegistration->modify) ? L"/modify" : L" /uninstall"; - hr = RegWriteStringFormatted(hkRegistration, REGISTRY_BUNDLE_UNINSTALL_STRING, L"\"%ls\" /%ls %ls", pRegistration->sczCacheExecutablePath, BURN_COMMANDLINE_SWITCH_CLEAN_ROOM, wzUninstallParameters); + hr = RegWriteStringFormatted(hkRegistration, REGISTRY_BUNDLE_UNINSTALL_STRING, L"\"%ls\" %ls", pRegistration->sczCacheExecutablePath, wzUninstallParameters); ExitOnFailure(hr, "Failed to write %ls value.", REGISTRY_BUNDLE_UNINSTALL_STRING); if (pRegistration->softwareTags.cSoftwareTags) @@ -1281,7 +1281,7 @@ static HRESULT UpdateResumeMode( if ((BURN_RESUME_MODE_ACTIVE == resumeMode || fRestartInitiated) && !pRegistration->fDisableResume) { // append RunOnce switch - hr = StrAllocFormatted(&sczRunOnceCommandLine, L"\"%ls\" /%ls /%ls", pRegistration->sczCacheExecutablePath, BURN_COMMANDLINE_SWITCH_CLEAN_ROOM, BURN_COMMANDLINE_SWITCH_RUNONCE); + hr = StrAllocFormatted(&sczRunOnceCommandLine, L"\"%ls\" /%ls", pRegistration->sczCacheExecutablePath, BURN_COMMANDLINE_SWITCH_RUNONCE); ExitOnFailure(hr, "Failed to format resume command line for RunOnce."); // write run key diff --git a/src/burn/engine/variable.cpp b/src/burn/engine/variable.cpp index 36dc92e0b..9d0aec520 100644 --- a/src/burn/engine/variable.cpp +++ b/src/burn/engine/variable.cpp @@ -302,8 +302,6 @@ extern "C" HRESULT VariableInitialize( {BURN_BUNDLE_ELEVATED, InitializeVariableNumeric, 0, FALSE, TRUE}, {BURN_BUNDLE_ACTIVE_PARENT, InitializeVariableString, NULL, FALSE, TRUE}, {BURN_BUNDLE_PROVIDER_KEY, InitializeVariableString, (DWORD_PTR)L"", FALSE, TRUE}, - {BURN_BUNDLE_SOURCE_PROCESS_PATH, InitializeVariableString, NULL, FALSE, TRUE}, - {BURN_BUNDLE_SOURCE_PROCESS_FOLDER, InitializeVariableString, NULL, FALSE, TRUE}, {BURN_BUNDLE_TAG, InitializeVariableString, (DWORD_PTR)L"", FALSE, TRUE}, {BURN_BUNDLE_UILEVEL, InitializeVariableNumeric, 0, FALSE, TRUE}, {BURN_BUNDLE_VERSION, InitializeVariableVersion, (DWORD_PTR)L"0", FALSE, TRUE}, @@ -1950,13 +1948,13 @@ static HRESULT InitializeVariableNativeMachine( ) { UNREFERENCED_PARAMETER(dwpData); - + HRESULT hr = S_OK; USHORT usNativeMachine = IMAGE_FILE_MACHINE_UNKNOWN; hr = ProcNativeMachine(::GetCurrentProcess(), &usNativeMachine); ExitOnFailure(hr, "Failed to get native machine value."); - + if (S_FALSE != hr) { hr = BVariantSetNumeric(pValue, usNativeMachine); diff --git a/src/burn/stub/stub.cpp b/src/burn/stub/stub.cpp index 339a54da3..696b6e7fe 100644 --- a/src/burn/stub/stub.cpp +++ b/src/burn/stub/stub.cpp @@ -37,20 +37,7 @@ int WINAPI wWinMain( hEngineFile = ::CreateFileW(sczPath, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); } - // If the engine is in the clean room, we'll do the unsafe initialization - // because some systems in Windows (namely GDI+) will fail when run in - // a process that protects against DLL hijacking. Since we know the clean - // room is in a clean folder and not subject to DLL hijacking we won't - // make ourselves perfectly secure so that we can load BAs that still - // depend on those parts of Windows that are insecure to DLL hijacking. - if (EngineInCleanRoom(lpCmdLine)) - { - AppInitializeUnsafe(); - } - else - { - AppInitialize(rgsczSafelyLoadSystemDlls, countof(rgsczSafelyLoadSystemDlls)); - } + AppInitialize(rgsczSafelyLoadSystemDlls, countof(rgsczSafelyLoadSystemDlls)); // call run hr = EngineRun(hInstance, hEngineFile, lpCmdLine, nCmdShow, &dwExitCode); diff --git a/src/burn/test/BurnUnitTest/PlanTest.cpp b/src/burn/test/BurnUnitTest/PlanTest.cpp index 3b6276e31..97f0c015f 100644 --- a/src/burn/test/BurnUnitTest/PlanTest.cpp +++ b/src/burn/test/BurnUnitTest/PlanTest.cpp @@ -3031,7 +3031,7 @@ namespace Bootstrapper hr = CoreInitializeConstants(pEngineState); NativeAssert::Succeeded(hr, "Failed to initialize core constants"); - hr = CacheInitializeSources(&pEngineState->cache, &pEngineState->registration, &pEngineState->variables, &pEngineState->internalCommand); + hr = CacheInitializeSources(&pEngineState->cache, &pEngineState->registration, &pEngineState->variables); NativeAssert::Succeeded(hr, "Failed to initialize cache sources."); #if TODO_REIMPLEMENT diff --git a/src/burn/test/BurnUnitTest/RegistrationTest.cpp b/src/burn/test/BurnUnitTest/RegistrationTest.cpp index ed307c6eb..2d6515ef9 100644 --- a/src/burn/test/BurnUnitTest/RegistrationTest.cpp +++ b/src/burn/test/BurnUnitTest/RegistrationTest.cpp @@ -836,7 +836,7 @@ namespace Bootstrapper void ValidateRunOnceKeyEntry(String^ exePath) { - this->ValidateRunOnceKeyString(TEST_BUNDLE_ID, String::Concat(L"\"", exePath, L"\" /burn.clean.room /burn.runonce")); + this->ValidateRunOnceKeyString(TEST_BUNDLE_ID, String::Concat(L"\"", exePath, L"\" /burn.runonce")); } void ValidateUninstallKeyNull(LPCWSTR valueName) diff --git a/src/ext/Bal/test/examples/TestEngine/precomp.h b/src/ext/Bal/test/examples/TestEngine/precomp.h index 0aefde9a1..e9ba3f983 100644 --- a/src/ext/Bal/test/examples/TestEngine/precomp.h +++ b/src/ext/Bal/test/examples/TestEngine/precomp.h @@ -11,10 +11,6 @@ #include "pathutil.h" #include "strutil.h" -#ifdef TODO_DELETE -#include "BootstrapperEngine.h" -#include "BootstrapperApplication.h" -#endif #include #include diff --git a/src/ext/Bal/wixiuiba/precomp.h b/src/ext/Bal/wixiuiba/precomp.h index ca2d4a8a8..cb6730fd8 100644 --- a/src/ext/Bal/wixiuiba/precomp.h +++ b/src/ext/Bal/wixiuiba/precomp.h @@ -15,10 +15,6 @@ #include #include -#ifdef TODO_DELETE -#include -#include -#endif #include #include @@ -30,4 +26,3 @@ #include #include "WixInternalUIBootstrapperApplication.h" -#include "wixiuiba.h" diff --git a/src/ext/Bal/wixiuiba/wixiuiba.h b/src/ext/Bal/wixiuiba/wixiuiba.h deleted file mode 100644 index 49d09cefe..000000000 --- a/src/ext/Bal/wixiuiba/wixiuiba.h +++ /dev/null @@ -1,17 +0,0 @@ -#pragma once -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - - -#ifdef TODO_DELETE - -struct INTERNAL_UI_BA_STATE -{ - BOOL fInitialized; - HINSTANCE hInstance; - LPWSTR sczAppBase; - HMODULE hPrereqModule; - PREQBA_DATA prereqData; - IBootstrapperApplication* pApplication; -}; - -#endif diff --git a/src/ext/Bal/wixstdba/precomp.h b/src/ext/Bal/wixstdba/precomp.h index 7ee4da4ab..8844d1504 100644 --- a/src/ext/Bal/wixstdba/precomp.h +++ b/src/ext/Bal/wixstdba/precomp.h @@ -35,10 +35,6 @@ #include #include -#ifdef TODO_DELETE -#include -#include -#endif #include #include @@ -49,23 +45,3 @@ #include #include "WixStandardBootstrapperApplication.h" - - -#ifdef TODO_DELETE - -HRESULT CreateBootstrapperApplication( - __in HMODULE hModule, - __in_opt PREQBA_DATA* pPrereqData, - __in IBootstrapperEngine* pEngine, - __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, - __inout BOOTSTRAPPER_CREATE_RESULTS* pResults, - __out IBootstrapperApplication** ppApplication - ); - -void DestroyBootstrapperApplication( - __in IBootstrapperApplication* pApplication, - __in const BOOTSTRAPPER_DESTROY_ARGS* pArgs, - __inout BOOTSTRAPPER_DESTROY_RESULTS* pResults - ); - -#endif