diff options
Diffstat (limited to 'src/burn/engine/elevation.cpp')
-rw-r--r-- | src/burn/engine/elevation.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/burn/engine/elevation.cpp b/src/burn/engine/elevation.cpp index c229fa58..0e1cf0b7 100644 --- a/src/burn/engine/elevation.cpp +++ b/src/burn/engine/elevation.cpp | |||
@@ -852,6 +852,9 @@ extern "C" HRESULT ElevationExecuteExePackage( | |||
852 | hr = BuffWriteString(&pbData, &cbData, pExecuteAction->exePackage.sczAncestors); | 852 | hr = BuffWriteString(&pbData, &cbData, pExecuteAction->exePackage.sczAncestors); |
853 | ExitOnFailure(hr, "Failed to write the list of ancestors to the message buffer."); | 853 | ExitOnFailure(hr, "Failed to write the list of ancestors to the message buffer."); |
854 | 854 | ||
855 | hr = BuffWriteString(&pbData, &cbData, pExecuteAction->exePackage.sczEngineWorkingDirectory); | ||
856 | ExitOnFailure(hr, "Failed to write the custom working directory to the message buffer."); | ||
857 | |||
855 | hr = VariableSerialize(pVariables, FALSE, &pbData, &cbData); | 858 | hr = VariableSerialize(pVariables, FALSE, &pbData, &cbData); |
856 | ExitOnFailure(hr, "Failed to write variables."); | 859 | ExitOnFailure(hr, "Failed to write variables."); |
857 | 860 | ||
@@ -2476,6 +2479,7 @@ static HRESULT OnExecuteExePackage( | |||
2476 | BURN_EXECUTE_ACTION executeAction = { }; | 2479 | BURN_EXECUTE_ACTION executeAction = { }; |
2477 | LPWSTR sczIgnoreDependencies = NULL; | 2480 | LPWSTR sczIgnoreDependencies = NULL; |
2478 | LPWSTR sczAncestors = NULL; | 2481 | LPWSTR sczAncestors = NULL; |
2482 | LPWSTR sczEngineWorkingDirectory = NULL; | ||
2479 | BOOTSTRAPPER_APPLY_RESTART exeRestart = BOOTSTRAPPER_APPLY_RESTART_NONE; | 2483 | BOOTSTRAPPER_APPLY_RESTART exeRestart = BOOTSTRAPPER_APPLY_RESTART_NONE; |
2480 | 2484 | ||
2481 | executeAction.type = BURN_EXECUTE_ACTION_TYPE_EXE_PACKAGE; | 2485 | executeAction.type = BURN_EXECUTE_ACTION_TYPE_EXE_PACKAGE; |
@@ -2496,6 +2500,9 @@ static HRESULT OnExecuteExePackage( | |||
2496 | hr = BuffReadString(pbData, cbData, &iData, &sczAncestors); | 2500 | hr = BuffReadString(pbData, cbData, &iData, &sczAncestors); |
2497 | ExitOnFailure(hr, "Failed to read the list of ancestors."); | 2501 | ExitOnFailure(hr, "Failed to read the list of ancestors."); |
2498 | 2502 | ||
2503 | hr = BuffReadString(pbData, cbData, &iData, &sczEngineWorkingDirectory); | ||
2504 | ExitOnFailure(hr, "Failed to read the custom working directory."); | ||
2505 | |||
2499 | hr = VariableDeserialize(pVariables, FALSE, pbData, cbData, &iData); | 2506 | hr = VariableDeserialize(pVariables, FALSE, pbData, cbData, &iData); |
2500 | ExitOnFailure(hr, "Failed to read variables."); | 2507 | ExitOnFailure(hr, "Failed to read variables."); |
2501 | 2508 | ||
@@ -2520,11 +2527,18 @@ static HRESULT OnExecuteExePackage( | |||
2520 | ExitOnFailure(hr, "Failed to allocate the list of ancestors."); | 2527 | ExitOnFailure(hr, "Failed to allocate the list of ancestors."); |
2521 | } | 2528 | } |
2522 | 2529 | ||
2530 | if (sczEngineWorkingDirectory && *sczEngineWorkingDirectory) | ||
2531 | { | ||
2532 | hr = StrAllocString(&executeAction.exePackage.sczEngineWorkingDirectory, sczEngineWorkingDirectory, 0); | ||
2533 | ExitOnFailure(hr, "Failed to allocate the custom working directory."); | ||
2534 | } | ||
2535 | |||
2523 | // Execute EXE package. | 2536 | // Execute EXE package. |
2524 | hr = ExeEngineExecutePackage(&executeAction, pCache, pVariables, static_cast<BOOL>(dwRollback), GenericExecuteMessageHandler, hPipe, &exeRestart); | 2537 | hr = ExeEngineExecutePackage(&executeAction, pCache, pVariables, static_cast<BOOL>(dwRollback), GenericExecuteMessageHandler, hPipe, &exeRestart); |
2525 | ExitOnFailure(hr, "Failed to execute EXE package."); | 2538 | ExitOnFailure(hr, "Failed to execute EXE package."); |
2526 | 2539 | ||
2527 | LExit: | 2540 | LExit: |
2541 | ReleaseStr(sczEngineWorkingDirectory); | ||
2528 | ReleaseStr(sczAncestors); | 2542 | ReleaseStr(sczAncestors); |
2529 | ReleaseStr(sczIgnoreDependencies); | 2543 | ReleaseStr(sczIgnoreDependencies); |
2530 | ReleaseStr(sczPackage); | 2544 | ReleaseStr(sczPackage); |