diff options
Diffstat (limited to 'src/engine/apply.cpp')
-rw-r--r-- | src/engine/apply.cpp | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/src/engine/apply.cpp b/src/engine/apply.cpp index ab7fa077..cf904405 100644 --- a/src/engine/apply.cpp +++ b/src/engine/apply.cpp | |||
@@ -1076,13 +1076,13 @@ static HRESULT ApplyCacheVerifyContainerOrPayload( | |||
1076 | hr = UserExperienceOnCacheContainerOrPayloadVerifyBegin(pContext->pUX, wzPackageOrContainerId, wzPayloadId); | 1076 | hr = UserExperienceOnCacheContainerOrPayloadVerifyBegin(pContext->pUX, wzPackageOrContainerId, wzPayloadId); |
1077 | ExitOnRootFailure(hr, "BA aborted cache container or payload verify begin."); | 1077 | ExitOnRootFailure(hr, "BA aborted cache container or payload verify begin."); |
1078 | 1078 | ||
1079 | if (INVALID_HANDLE_VALUE != pContext->hPipe) | 1079 | if (pContainer) |
1080 | { | 1080 | { |
1081 | hr = ElevationCacheVerifyContainerOrPayload(pContext->hPipe, pContainer, pPackage, pPayloadGroupItem->pPayload, pContext->wzLayoutDirectory); | 1081 | hr = CacheVerifyContainer(pContainer, pContext->wzLayoutDirectory); |
1082 | } | 1082 | } |
1083 | else if (pContainer) | 1083 | else if (!pContext->wzLayoutDirectory && INVALID_HANDLE_VALUE != pContext->hPipe) |
1084 | { | 1084 | { |
1085 | hr = CacheVerifyContainer(pContainer, pContext->wzLayoutDirectory); | 1085 | hr = ElevationCacheVerifyPayload(pContext->hPipe, pPackage, pPayloadGroupItem->pPayload); |
1086 | } | 1086 | } |
1087 | else | 1087 | else |
1088 | { | 1088 | { |
@@ -1289,14 +1289,7 @@ static HRESULT LayoutBundle( | |||
1289 | hr = UserExperienceOnCacheVerifyBegin(pContext->pUX, NULL, NULL); | 1289 | hr = UserExperienceOnCacheVerifyBegin(pContext->pUX, NULL, NULL); |
1290 | ExitOnRootFailure(hr, "BA aborted cache verify begin."); | 1290 | ExitOnRootFailure(hr, "BA aborted cache verify begin."); |
1291 | 1291 | ||
1292 | if (INVALID_HANDLE_VALUE != pContext->hPipe) | 1292 | hr = CacheLayoutBundle(wzExecutableName, pContext->wzLayoutDirectory, wzUnverifiedPath); |
1293 | { | ||
1294 | hr = ElevationLayoutBundle(pContext->hPipe, pContext->wzLayoutDirectory, wzUnverifiedPath); | ||
1295 | } | ||
1296 | else | ||
1297 | { | ||
1298 | hr = CacheLayoutBundle(wzExecutableName, pContext->wzLayoutDirectory, wzUnverifiedPath); | ||
1299 | } | ||
1300 | 1293 | ||
1301 | if (SUCCEEDED(hr)) | 1294 | if (SUCCEEDED(hr)) |
1302 | { | 1295 | { |
@@ -1539,11 +1532,7 @@ static HRESULT LayoutOrCacheContainerOrPayload( | |||
1539 | hr = UserExperienceOnCacheVerifyBegin(pContext->pUX, wzPackageOrContainerId, wzPayloadId); | 1532 | hr = UserExperienceOnCacheVerifyBegin(pContext->pUX, wzPackageOrContainerId, wzPayloadId); |
1540 | ExitOnRootFailure(hr, "BA aborted cache verify begin."); | 1533 | ExitOnRootFailure(hr, "BA aborted cache verify begin."); |
1541 | 1534 | ||
1542 | if (INVALID_HANDLE_VALUE != pContext->hPipe) // pass the decision off to the elevated process. | 1535 | if (pContext->wzLayoutDirectory) // layout the container or payload. |
1543 | { | ||
1544 | hr = ElevationCacheOrLayoutContainerOrPayload(pContext->hPipe, pContainer, pPackage, pPayload, pContext->wzLayoutDirectory, wzUnverifiedPath, fMove); | ||
1545 | } | ||
1546 | else if (pContext->wzLayoutDirectory) // layout the container or payload. | ||
1547 | { | 1536 | { |
1548 | if (pContainer) | 1537 | if (pContainer) |
1549 | { | 1538 | { |
@@ -1554,6 +1543,10 @@ static HRESULT LayoutOrCacheContainerOrPayload( | |||
1554 | hr = CacheLayoutPayload(pPayload, pContext->wzLayoutDirectory, wzUnverifiedPath, fMove); | 1543 | hr = CacheLayoutPayload(pPayload, pContext->wzLayoutDirectory, wzUnverifiedPath, fMove); |
1555 | } | 1544 | } |
1556 | } | 1545 | } |
1546 | else if (INVALID_HANDLE_VALUE != pContext->hPipe) // pass the decision off to the elevated process. | ||
1547 | { | ||
1548 | hr = ElevationCacheCompletePayload(pContext->hPipe, pPackage, pPayload, wzUnverifiedPath, fMove); | ||
1549 | } | ||
1557 | else // complete the payload. | 1550 | else // complete the payload. |
1558 | { | 1551 | { |
1559 | hr = CacheCompletePayload(pPackage->fPerMachine, pPayload, pPackage->sczCacheId, wzUnverifiedPath, fMove); | 1552 | hr = CacheCompletePayload(pPackage->fPerMachine, pPayload, pPackage->sczCacheId, wzUnverifiedPath, fMove); |