HyperVSwitch
HyperVSwitch copied to clipboard
Restart code does not work properly
The restart code with ExitWindowsEx
as in v1.0 worked fine in Windows 7. In Windows 10 is logs off the user but does not restart the computer. This has been changed in v1.1 but now it always fails with error 1314 (“A Required Privilege Is Not Held by the Client”). A fallback method (call shutdown.exe
) is in place. This needs proper testing on all systems and cleaning up. Maybe only the current fallback method should be used everywhere.
You need to acquire your token and then AdjustTokenPrivileges
before the system will honor your reboot request. Here's an example in C but converting it to C# should be super easy.