diff options
Diffstat (limited to 'src/engine/core.cpp')
| -rw-r--r-- | src/engine/core.cpp | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/engine/core.cpp b/src/engine/core.cpp index 644752ff..6b32931d 100644 --- a/src/engine/core.cpp +++ b/src/engine/core.cpp | |||
| @@ -1061,7 +1061,7 @@ LExit: | |||
| 1061 | return hr; | 1061 | return hr; |
| 1062 | } | 1062 | } |
| 1063 | 1063 | ||
| 1064 | extern "C" HRESULT CoreCleanup( | 1064 | extern "C" void CoreCleanup( |
| 1065 | __in BURN_ENGINE_STATE* pEngineState | 1065 | __in BURN_ENGINE_STATE* pEngineState |
| 1066 | ) | 1066 | ) |
| 1067 | { | 1067 | { |
| @@ -1069,6 +1069,14 @@ extern "C" HRESULT CoreCleanup( | |||
| 1069 | LONGLONG llValue = 0; | 1069 | LONGLONG llValue = 0; |
| 1070 | BOOL fNeedsElevation = pEngineState->registration.fPerMachine && INVALID_HANDLE_VALUE == pEngineState->companionConnection.hPipe; | 1070 | BOOL fNeedsElevation = pEngineState->registration.fPerMachine && INVALID_HANDLE_VALUE == pEngineState->companionConnection.hPipe; |
| 1071 | 1071 | ||
| 1072 | LogId(REPORT_STANDARD, MSG_CLEANUP_BEGIN); | ||
| 1073 | |||
| 1074 | if (pEngineState->fApplied && BOOTSTRAPPER_ACTION_LAYOUT < pEngineState->plan.action && BOOTSTRAPPER_ACTION_UPDATE_REPLACE > pEngineState->plan.action) | ||
| 1075 | { | ||
| 1076 | LogId(REPORT_STANDARD, MSG_CLEANUP_SKIPPED_APPLY); | ||
| 1077 | ExitFunction(); | ||
| 1078 | } | ||
| 1079 | |||
| 1072 | if (fNeedsElevation) | 1080 | if (fNeedsElevation) |
| 1073 | { | 1081 | { |
| 1074 | hr = VariableGetNumeric(&pEngineState->variables, BURN_BUNDLE_ELEVATED, &llValue); | 1082 | hr = VariableGetNumeric(&pEngineState->variables, BURN_BUNDLE_ELEVATED, &llValue); |
| @@ -1078,12 +1086,11 @@ extern "C" HRESULT CoreCleanup( | |||
| 1078 | { | 1086 | { |
| 1079 | fNeedsElevation = FALSE; | 1087 | fNeedsElevation = FALSE; |
| 1080 | } | 1088 | } |
| 1081 | } | 1089 | else |
| 1082 | 1090 | { | |
| 1083 | if (pEngineState->fApplied && BOOTSTRAPPER_ACTION_LAYOUT < pEngineState->plan.action && BOOTSTRAPPER_ACTION_UPDATE_REPLACE > pEngineState->plan.action || | 1091 | LogId(REPORT_STANDARD, MSG_CLEANUP_SKIPPED_ELEVATION_REQUIRED); |
| 1084 | fNeedsElevation) | 1092 | ExitFunction(); |
| 1085 | { | 1093 | } |
| 1086 | ExitFunction(); | ||
| 1087 | } | 1094 | } |
| 1088 | 1095 | ||
| 1089 | if (!pEngineState->fDetected) | 1096 | if (!pEngineState->fDetected) |
| @@ -1104,7 +1111,7 @@ extern "C" HRESULT CoreCleanup( | |||
| 1104 | ExitOnFailure(hr, "Apply during cleanup failed"); | 1111 | ExitOnFailure(hr, "Apply during cleanup failed"); |
| 1105 | 1112 | ||
| 1106 | LExit: | 1113 | LExit: |
| 1107 | return hr; | 1114 | LogId(REPORT_STANDARD, MSG_CLEANUP_COMPLETE, hr); |
| 1108 | } | 1115 | } |
| 1109 | 1116 | ||
| 1110 | // internal helper functions | 1117 | // internal helper functions |
