mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
add run as administrator when holding ctrl and shift to Shell plugin
This commit is contained in:
parent
04882ad9f4
commit
d3b4c5469b
1 changed files with 32 additions and 4 deletions
|
|
@ -73,7 +73,14 @@ namespace Flow.Launcher.Plugin.Shell
|
||||||
IcoPath = Image,
|
IcoPath = Image,
|
||||||
Action = c =>
|
Action = c =>
|
||||||
{
|
{
|
||||||
Execute(Process.Start, PrepareProcessStartInfo(m, c.SpecialKeyState.CtrlPressed));
|
var runAsAdministrator = (
|
||||||
|
c.SpecialKeyState.CtrlPressed &&
|
||||||
|
c.SpecialKeyState.ShiftPressed &&
|
||||||
|
!c.SpecialKeyState.AltPressed &&
|
||||||
|
!c.SpecialKeyState.WinPressed
|
||||||
|
);
|
||||||
|
|
||||||
|
Execute(Process.Start, PrepareProcessStartInfo(m, runAsAdministrator));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
@ -106,7 +113,14 @@ namespace Flow.Launcher.Plugin.Shell
|
||||||
IcoPath = Image,
|
IcoPath = Image,
|
||||||
Action = c =>
|
Action = c =>
|
||||||
{
|
{
|
||||||
Execute(Process.Start, PrepareProcessStartInfo(m.Key));
|
var runAsAdministrator = (
|
||||||
|
c.SpecialKeyState.CtrlPressed &&
|
||||||
|
c.SpecialKeyState.ShiftPressed &&
|
||||||
|
!c.SpecialKeyState.AltPressed &&
|
||||||
|
!c.SpecialKeyState.WinPressed
|
||||||
|
);
|
||||||
|
|
||||||
|
Execute(Process.Start, PrepareProcessStartInfo(m.Key, runAsAdministrator));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -129,7 +143,14 @@ namespace Flow.Launcher.Plugin.Shell
|
||||||
IcoPath = Image,
|
IcoPath = Image,
|
||||||
Action = c =>
|
Action = c =>
|
||||||
{
|
{
|
||||||
Execute(Process.Start, PrepareProcessStartInfo(cmd));
|
var runAsAdministrator = (
|
||||||
|
c.SpecialKeyState.CtrlPressed &&
|
||||||
|
c.SpecialKeyState.ShiftPressed &&
|
||||||
|
!c.SpecialKeyState.AltPressed &&
|
||||||
|
!c.SpecialKeyState.WinPressed
|
||||||
|
);
|
||||||
|
|
||||||
|
Execute(Process.Start, PrepareProcessStartInfo(cmd, runAsAdministrator));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -147,7 +168,14 @@ namespace Flow.Launcher.Plugin.Shell
|
||||||
IcoPath = Image,
|
IcoPath = Image,
|
||||||
Action = c =>
|
Action = c =>
|
||||||
{
|
{
|
||||||
Execute(Process.Start, PrepareProcessStartInfo(m.Key));
|
var runAsAdministrator = (
|
||||||
|
c.SpecialKeyState.CtrlPressed &&
|
||||||
|
c.SpecialKeyState.ShiftPressed &&
|
||||||
|
!c.SpecialKeyState.AltPressed &&
|
||||||
|
!c.SpecialKeyState.WinPressed
|
||||||
|
);
|
||||||
|
|
||||||
|
Execute(Process.Start, PrepareProcessStartInfo(m.Key, runAsAdministrator));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue