diff options
Diffstat (limited to 'src/engine/msuengine.cpp')
| -rw-r--r-- | src/engine/msuengine.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/engine/msuengine.cpp b/src/engine/msuengine.cpp index 59f9a656..02ceb0c6 100644 --- a/src/engine/msuengine.cpp +++ b/src/engine/msuengine.cpp | |||
| @@ -264,6 +264,8 @@ extern "C" HRESULT MsuEngineExecutePackage( | |||
| 264 | GENERIC_EXECUTE_MESSAGE message = { }; | 264 | GENERIC_EXECUTE_MESSAGE message = { }; |
| 265 | DWORD dwExitCode = 0; | 265 | DWORD dwExitCode = 0; |
| 266 | BOOL fUseSysNativePath = FALSE; | 266 | BOOL fUseSysNativePath = FALSE; |
| 267 | BURN_PACKAGE* pPackage = pExecuteAction->msuPackage.pPackage; | ||
| 268 | BURN_PAYLOAD* pPackagePayload = pPackage->payloads.rgpPayloads[0]; | ||
| 267 | 269 | ||
| 268 | #if !defined(_WIN64) | 270 | #if !defined(_WIN64) |
| 269 | hr = ProcWow64(::GetCurrentProcess(), &fUseSysNativePath); | 271 | hr = ProcWow64(::GetCurrentProcess(), &fUseSysNativePath); |
| @@ -295,13 +297,13 @@ extern "C" HRESULT MsuEngineExecutePackage( | |||
| 295 | { | 297 | { |
| 296 | case BOOTSTRAPPER_ACTION_STATE_INSTALL: | 298 | case BOOTSTRAPPER_ACTION_STATE_INSTALL: |
| 297 | // get cached MSU path | 299 | // get cached MSU path |
| 298 | hr = CacheGetCompletedPath(TRUE, pExecuteAction->msuPackage.pPackage->sczCacheId, &sczCachedDirectory); | 300 | hr = CacheGetCompletedPath(TRUE, pPackage->sczCacheId, &sczCachedDirectory); |
| 299 | ExitOnFailure(hr, "Failed to get cached path for package: %ls", pExecuteAction->msuPackage.pPackage->sczId); | 301 | ExitOnFailure(hr, "Failed to get cached path for package: %ls", pPackage->sczId); |
| 300 | 302 | ||
| 301 | // Best effort to set the execute package cache folder variable. | 303 | // Best effort to set the execute package cache folder variable. |
| 302 | VariableSetString(pVariables, BURN_BUNDLE_EXECUTE_PACKAGE_CACHE_FOLDER, sczCachedDirectory, TRUE, FALSE); | 304 | VariableSetString(pVariables, BURN_BUNDLE_EXECUTE_PACKAGE_CACHE_FOLDER, sczCachedDirectory, TRUE, FALSE); |
| 303 | 305 | ||
| 304 | hr = PathConcat(sczCachedDirectory, pExecuteAction->msuPackage.pPackage->rgPayloads[0].pPayload->sczFilePath, &sczMsuPath); | 306 | hr = PathConcat(sczCachedDirectory, pPackagePayload->sczFilePath, &sczMsuPath); |
| 305 | ExitOnFailure(hr, "Failed to build MSU path."); | 307 | ExitOnFailure(hr, "Failed to build MSU path."); |
| 306 | 308 | ||
| 307 | // format command | 309 | // format command |
| @@ -311,7 +313,7 @@ extern "C" HRESULT MsuEngineExecutePackage( | |||
| 311 | 313 | ||
| 312 | case BOOTSTRAPPER_ACTION_STATE_UNINSTALL: | 314 | case BOOTSTRAPPER_ACTION_STATE_UNINSTALL: |
| 313 | // format command | 315 | // format command |
| 314 | hr = StrAllocFormatted(&sczCommand, L"\"%ls\" /uninstall /kb:%ls /quiet /norestart", sczWusaPath, pExecuteAction->msuPackage.pPackage->Msu.sczKB); | 316 | hr = StrAllocFormatted(&sczCommand, L"\"%ls\" /uninstall /kb:%ls /quiet /norestart", sczWusaPath, pPackage->Msu.sczKB); |
| 315 | ExitOnFailure(hr, "Failed to format MSU uninstall command."); | 317 | ExitOnFailure(hr, "Failed to format MSU uninstall command."); |
| 316 | break; | 318 | break; |
| 317 | 319 | ||
| @@ -329,7 +331,7 @@ extern "C" HRESULT MsuEngineExecutePackage( | |||
| 329 | ExitOnFailure(hr, "Failed to append log path to MSU command-line."); | 331 | ExitOnFailure(hr, "Failed to append log path to MSU command-line."); |
| 330 | } | 332 | } |
| 331 | 333 | ||
| 332 | LogId(REPORT_STANDARD, MSG_APPLYING_PACKAGE, LoggingRollbackOrExecute(fRollback), pExecuteAction->msuPackage.pPackage->sczId, LoggingActionStateToString(pExecuteAction->msuPackage.action), sczMsuPath ? sczMsuPath : pExecuteAction->msuPackage.pPackage->Msu.sczKB, sczCommand); | 334 | LogId(REPORT_STANDARD, MSG_APPLYING_PACKAGE, LoggingRollbackOrExecute(fRollback), pPackage->sczId, LoggingActionStateToString(pExecuteAction->msuPackage.action), sczMsuPath ? sczMsuPath : pPackage->Msu.sczKB, sczCommand); |
| 333 | 335 | ||
| 334 | hr = EnsureWUServiceEnabled(fStopWusaService, &schWu, &fWuWasDisabled); | 336 | hr = EnsureWUServiceEnabled(fStopWusaService, &schWu, &fWuWasDisabled); |
| 335 | ExitOnFailure(hr, "Failed to ensure WU service was enabled to install MSU package."); | 337 | ExitOnFailure(hr, "Failed to ensure WU service was enabled to install MSU package."); |
