mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
LaunchProcess tweak https://github.com/seerge/g-helper/issues/2860
This commit is contained in:
@@ -949,7 +949,10 @@ namespace GHelper.Input
|
|||||||
if (string.IsNullOrEmpty(command)) return;
|
if (string.IsNullOrEmpty(command)) return;
|
||||||
try
|
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)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user