Skip to content

Commit

Permalink
LaunchProcess tweak #2860
Browse files Browse the repository at this point in the history
  • Loading branch information
seerge committed Jul 18, 2024
1 parent 1a7b7b3 commit 10163db
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/Input/InputDispatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,10 @@ static void LaunchProcess(string command = "")
if (string.IsNullOrEmpty(command)) return;
try
{
RestrictedProcessHelper.RunAsRestrictedUser(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "cmd.exe"), "/C " + command);
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)
{
Expand Down

0 comments on commit 10163db

Please sign in to comment.