Skip to content

Commit 4bdcb52

Browse files
committed
Fix Shutdown->Restart to Firmware option failing in nightly builds for users without environment privileges
reported by mikewolf
1 parent e4550e0 commit 4bdcb52

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

ProcessHacker/actions.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,18 @@ BOOLEAN PhUiRestartComputer(
773773
break;
774774
}
775775

776+
if (!NT_SUCCESS(PhAdjustPrivilege(NULL, SE_SYSTEM_ENVIRONMENT_PRIVILEGE, TRUE)))
777+
{
778+
PhShowMessage2(
779+
WindowHandle,
780+
TDCBF_OK_BUTTON,
781+
TD_ERROR_ICON,
782+
L"Unable to restart to firmware options.",
783+
L"Make sure Process Hacker is running with administrative privileges."
784+
);
785+
break;
786+
}
787+
776788
if (!PhIsFirmwareSupported())
777789
{
778790
PhShowMessage2(

0 commit comments

Comments
 (0)