Fix shutdown/restart options failing when multiple users are logged on
@@ -601,7 +601,7 @@ BOOLEAN PhUiRestartComputer(
NULL,
NULL,
0,
- SHUTDOWN_RESTART | Flags,
+ SHUTDOWN_FORCE_OTHERS | SHUTDOWN_RESTART | Flags,
SHTDN_REASON_FLAG_PLANNED
);
@@ -707,7 +707,7 @@ BOOLEAN PhUiRestartComputer(
NULL,
NULL,
0,
- SHUTDOWN_RESTART,
+ SHUTDOWN_FORCE_OTHERS | SHUTDOWN_RESTART,
SHTDN_REASON_FLAG_PLANNED
);
@@ -895,7 +895,7 @@ BOOLEAN PhUiRestartComputer(
NULL,
NULL,
0,
- SHUTDOWN_RESTART,
+ SHUTDOWN_FORCE_OTHERS | SHUTDOWN_RESTART,
SHTDN_REASON_FLAG_PLANNED
);
@@ -929,7 +929,7 @@ BOOLEAN PhUiRestartComputer(
NULL,
NULL,
0,
- SHUTDOWN_RESTART | SHUTDOWN_INSTALL_UPDATES,
+ SHUTDOWN_FORCE_OTHERS | SHUTDOWN_RESTART | SHUTDOWN_INSTALL_UPDATES,
SHTDN_REASON_FLAG_PLANNED
);
@@ -997,7 +997,7 @@ BOOLEAN PhUiShutdownComputer(
NULL,
NULL,
0,
- SHUTDOWN_POWEROFF | Flags,
+ SHUTDOWN_FORCE_OTHERS | SHUTDOWN_POWEROFF | Flags,
SHTDN_REASON_FLAG_PLANNED
);
@@ -1099,7 +1099,7 @@ BOOLEAN PhUiShutdownComputer(
NULL,
NULL,
0,
- SHUTDOWN_POWEROFF | SHUTDOWN_INSTALL_UPDATES,
+ SHUTDOWN_FORCE_OTHERS | SHUTDOWN_POWEROFF | SHUTDOWN_INSTALL_UPDATES,
SHTDN_REASON_FLAG_PLANNED
);
@@ -1243,7 +1243,7 @@ VOID PhUiHandleComputerBootApplicationMenu(
NULL,
NULL,
0,
- SHUTDOWN_RESTART,
+ SHUTDOWN_FORCE_OTHERS | SHUTDOWN_RESTART,
SHTDN_REASON_FLAG_PLANNED
);
@@ -1295,7 +1295,7 @@ VOID PhUiHandleComputerFirmwareApplicationMenu(
NULL,
NULL,
0,
- SHUTDOWN_RESTART,
+ SHUTDOWN_FORCE_OTHERS | SHUTDOWN_RESTART,
SHTDN_REASON_FLAG_PLANNED
);
@@ -3125,7 +3125,7 @@ BOOLEAN PhUiLoadDllProcess(
&processHandle,
PROCESS_QUERY_LIMITED_INFORMATION | PROCESS_SET_LIMITED_INFORMATION |
PROCESS_CREATE_THREAD | PROCESS_VM_OPERATION |
- PROCESS_VM_READ | PROCESS_VM_WRITE,
+ PROCESS_VM_READ | PROCESS_VM_WRITE | SYNCHRONIZE,
Process->ProcessId
);
}
