From 2f8bf7c0cc4402777315e93536fbc63e1e1f0fee Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Fri, 26 Aug 2022 19:48:42 -0400 Subject: Pass `/xlog` to elevated engine. Fixes https://github.com/wixtoolset/issues/issues/6534. --- src/burn/engine/elevation.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/burn') diff --git a/src/burn/engine/elevation.cpp b/src/burn/engine/elevation.cpp index c27289c5..4d2e8544 100644 --- a/src/burn/engine/elevation.cpp +++ b/src/burn/engine/elevation.cpp @@ -1644,6 +1644,12 @@ static HRESULT LaunchElevatedProcess( hr = StrAllocFormatted(&sczParameters, L"-q -%ls %ls %ls %u", BURN_COMMANDLINE_SWITCH_ELEVATED, pConnection->sczName, pConnection->sczSecret, dwCurrentProcessId); ExitOnFailure(hr, "Failed to allocate parameters for elevated process."); + if (BURN_LOGGING_ATTRIBUTE_EXTRADEBUG & pEngineState->internalCommand.dwLoggingAttributes) + { + hr = StrAllocConcatFormatted(&sczParameters, L" -%ls=%ls", BURN_COMMANDLINE_SWITCH_LOG_MODE, L"x"); + ExitOnFailure(hr, "Failed to set log mode in elevated process command-line."); + } + // Since ShellExecuteEx doesn't support passing inherited handles, don't bother with CoreAppendFileHandleSelfToCommandLine. // We could fallback to using ::DuplicateHandle to inject the file handle later if necessary. hr = ShelExec(pEngineState->sczBundleEngineWorkingPath, sczParameters, L"runas", NULL, SW_SHOWNA, hwndParent, &hProcess); -- cgit v1.2.3-55-g6feb