This commit is contained in:
Serge
2024-07-18 10:00:59 +02:00
parent 1a7b7b3761
commit 10163db7ea

View File

@@ -949,6 +949,9 @@ namespace GHelper.Input
if (string.IsNullOrEmpty(command)) return;
try
{
if (command.StartsWith("shutdown"))
ProcessHelper.RunCMD("cmd", "/C " + command);
else
RestrictedProcessHelper.RunAsRestrictedUser(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "cmd.exe"), "/C " + command);
}
catch (Exception ex)