Merge branch 'feature/fixed-run-as-admin' into 'release/0.2.2.015'
Fixed: runas admin for processes See merge request SympatheticFire/linear-app-launcher!23
This commit is contained in:
commit
483222d808
@ -358,9 +358,22 @@ namespace FizzyLauncher.Windows.Forms
|
|||||||
ProcessStartInfo p = new ProcessStartInfo();
|
ProcessStartInfo p = new ProcessStartInfo();
|
||||||
p.FileName = model.CleanProcessFilename;
|
p.FileName = model.CleanProcessFilename;
|
||||||
p.WindowStyle = model.ProcessWindowStyle;
|
p.WindowStyle = model.ProcessWindowStyle;
|
||||||
if (!string.IsNullOrWhiteSpace(model.CleanProcessArgument)) p.Arguments = model.CleanProcessArgument;
|
|
||||||
if (!string.IsNullOrWhiteSpace(model.CleanProcessWorkingDirectory)) p.WorkingDirectory = model.CleanProcessWorkingDirectory;
|
if (!string.IsNullOrWhiteSpace(model.CleanProcessArgument))
|
||||||
if (model.ProcessAsAdmin) p.Verb = "runas";
|
{
|
||||||
|
p.Arguments = model.CleanProcessArgument;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(model.CleanProcessWorkingDirectory))
|
||||||
|
{
|
||||||
|
p.WorkingDirectory = model.CleanProcessWorkingDirectory;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (model.ProcessAsAdmin)
|
||||||
|
{
|
||||||
|
p.UseShellExecute = true;
|
||||||
|
p.Verb = "runas";
|
||||||
|
}
|
||||||
|
|
||||||
MainForm parentForm = findMainForm();
|
MainForm parentForm = findMainForm();
|
||||||
if (parentForm != null)
|
if (parentForm != null)
|
||||||
|
Reference in New Issue
Block a user