[PTRun][System]Support automatic logon after reboot (#33740)

## Summary of the Pull Request
Adds support for auto-logon after reboot when using the reboot command
in system plugin.

The behavior after reboot depends on the system setting for auto-logon
after reboot/updates.

https://learn.microsoft.com/windows-server/administration/windows-commands/shutdown
This commit is contained in:
Heiko 2024-07-22 16:43:42 +02:00 committed by GitHub
parent 70d3d5f16e
commit ca97e01d59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -61,7 +61,7 @@ namespace Microsoft.PowerToys.Run.Plugin.System.Components
IcoPath = $"Images\\restart.{iconTheme}.png",
Action = c =>
{
return ResultHelper.ExecuteCommand(confirmCommands, Resources.Microsoft_plugin_sys_restart_computer_confirmation, () => Helper.OpenInShell("shutdown", "/r /t 0"));
return ResultHelper.ExecuteCommand(confirmCommands, Resources.Microsoft_plugin_sys_restart_computer_confirmation, () => Helper.OpenInShell("shutdown", "/g /t 0"));
},
},
new Result