@joebigelow / wix / commits / 2f8bf7c0

Pass `/xlog` to elevated engine.

Fixes https://github.com/wixtoolset/issues/issues/6534.

Bob Arnson committed Aug 26, 2022 at 19:48 UTC 2f8bf7c0cc4402777315e93536fbc63e1e1f0fee
1 file changed +6
src/burn/engine/elevation.cpp
+6
@@ -1644,6 +1644,12 @@ static HRESULT LaunchElevatedProcess(
1644 hr = StrAllocFormatted(&sczParameters, L"-q -%ls %ls %ls %u", BURN_COMMANDLINE_SWITCH_ELEVATED, pConnection->sczName, pConnection->sczSecret, dwCurrentProcessId);
1645 ExitOnFailure(hr, "Failed to allocate parameters for elevated process.");
1646
1647 + if (BURN_LOGGING_ATTRIBUTE_EXTRADEBUG & pEngineState->internalCommand.dwLoggingAttributes)
1648 + {
1649 + hr = StrAllocConcatFormatted(&sczParameters, L" -%ls=%ls", BURN_COMMANDLINE_SWITCH_LOG_MODE, L"x");
1650 + ExitOnFailure(hr, "Failed to set log mode in elevated process command-line.");
1651 + }
1652 +
1653 // Since ShellExecuteEx doesn't support passing inherited handles, don't bother with CoreAppendFileHandleSelfToCommandLine.
1654 // We could fallback to using ::DuplicateHandle to inject the file handle later if necessary.
1655 hr = ShelExec(pEngineState->sczBundleEngineWorkingPath, sczParameters, L"runas", NULL, SW_SHOWNA, hwndParent, &hProcess);