diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2021-08-03 18:06:54 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2021-08-04 10:03:57 -0500 |
commit | cdba28de1ee229369b254c62bc58cf2f001899a3 (patch) | |
tree | 4ae9a7aafd83ff311c5440df2c6d4a8693f8f23b /src/burn/engine/exeengine.cpp | |
parent | 75d645c6aec0df0e02bd3aaf2fe2571d83316d4c (diff) | |
download | wix-cdba28de1ee229369b254c62bc58cf2f001899a3.tar.gz wix-cdba28de1ee229369b254c62bc58cf2f001899a3.tar.bz2 wix-cdba28de1ee229369b254c62bc58cf2f001899a3.zip |
Add argument and policy setting to set Burn's base working directory.
Fixes #5856
Diffstat (limited to 'src/burn/engine/exeengine.cpp')
-rw-r--r-- | src/burn/engine/exeengine.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/burn/engine/exeengine.cpp b/src/burn/engine/exeengine.cpp index 9eea4960..67da3bdd 100644 --- a/src/burn/engine/exeengine.cpp +++ b/src/burn/engine/exeengine.cpp | |||
@@ -308,6 +308,12 @@ extern "C" HRESULT ExeEnginePlanAddPackage( | |||
308 | ExitOnFailure(hr, "Failed to allocate the list of ancestors."); | 308 | ExitOnFailure(hr, "Failed to allocate the list of ancestors."); |
309 | } | 309 | } |
310 | 310 | ||
311 | if (pPackage->Exe.wzEngineWorkingDirectory) | ||
312 | { | ||
313 | hr = StrAllocString(&pAction->exePackage.sczEngineWorkingDirectory, pPackage->Exe.wzEngineWorkingDirectory, 0); | ||
314 | ExitOnFailure(hr, "Failed to allocate the custom working directory."); | ||
315 | } | ||
316 | |||
311 | LoggingSetPackageVariable(pPackage, NULL, FALSE, pLog, pVariables, NULL); // ignore errors. | 317 | LoggingSetPackageVariable(pPackage, NULL, FALSE, pLog, pVariables, NULL); // ignore errors. |
312 | } | 318 | } |
313 | 319 | ||
@@ -488,6 +494,9 @@ extern "C" HRESULT ExeEngineExecutePackage( | |||
488 | 494 | ||
489 | if (BURN_EXE_PROTOCOL_TYPE_BURN == pPackage->Exe.protocol) | 495 | if (BURN_EXE_PROTOCOL_TYPE_BURN == pPackage->Exe.protocol) |
490 | { | 496 | { |
497 | hr = CoreAppendEngineWorkingDirectoryToCommandLine(pExecuteAction->exePackage.sczEngineWorkingDirectory, &sczCommand, &sczCommandObfuscated); | ||
498 | ExitOnFailure(hr, "Failed to append the custom working directory to the exepackage command line."); | ||
499 | |||
491 | hr = CoreAppendFileHandleSelfToCommandLine(sczExecutablePath, &hExecutableFile, &sczCommand, &sczCommandObfuscated); | 500 | hr = CoreAppendFileHandleSelfToCommandLine(sczExecutablePath, &hExecutableFile, &sczCommand, &sczCommandObfuscated); |
492 | ExitOnFailure(hr, "Failed to append %ls", BURN_COMMANDLINE_SWITCH_FILEHANDLE_SELF); | 501 | ExitOnFailure(hr, "Failed to append %ls", BURN_COMMANDLINE_SWITCH_FILEHANDLE_SELF); |
493 | } | 502 | } |