@joebigelow / wix-1 / commits / 75bc4c3b

Log message when the elevated process is not running elevated.

Fixes 5650

Sean Hall committed Sep 2, 2022 at 16:06 UTC 75bc4c3bcf2dcb85fdc642547e339f54775db43a
2 files changed +12
src/burn/engine/engine.cpp
+5
@@ -696,6 +696,11 @@ static HRESULT RunElevated(
696
697 LogRedirect(RedirectLoggingOverPipe, &loggingContext);
698
699 + if (!pEngineState->internalCommand.fInitiallyElevated)
700 + {
701 + LogId(REPORT_ERROR, MSG_ELEVATED_ENGINE_NOT_ELEVATED);
702 + }
703 +
704 // Create a top-level window to prevent shutting down the elevated process.
705 hr = UiCreateMessageWindow(hInstance, pEngineState);
706 ExitOnFailure(hr, "Failed to create the message window.");
src/burn/engine/engine.mc
+7
@@ -177,6 +177,13 @@ Language=English
177 Exit code: 0x%1!x!
178 .
179
180 +MessageId=22
181 +Severity=Error
182 +SymbolicName=MSG_ELEVATED_ENGINE_NOT_ELEVATED
183 +Language=English
184 +Elevated engine process is not running with elevated privileges. Either run the bundle as a privileged user or reconfigure Windows to allow standard users to request elevation.
185 +.
186 +
187 MessageId=51
188 Severity=Error
189 SymbolicName=MSG_FAILED_PARSE_CONDITION