Fixed: runas admin for processes
This commit is contained in:
parent
ff994e26ff
commit
9193c92109
@ -358,9 +358,22 @@ namespace FizzyLauncher.Windows.Forms
|
||||
ProcessStartInfo p = new ProcessStartInfo();
|
||||
p.FileName = model.CleanProcessFilename;
|
||||
p.WindowStyle = model.ProcessWindowStyle;
|
||||
if (!string.IsNullOrWhiteSpace(model.CleanProcessArgument)) p.Arguments = model.CleanProcessArgument;
|
||||
if (!string.IsNullOrWhiteSpace(model.CleanProcessWorkingDirectory)) p.WorkingDirectory = model.CleanProcessWorkingDirectory;
|
||||
if (model.ProcessAsAdmin) p.Verb = "runas";
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(model.CleanProcessArgument))
|
||||
{
|
||||
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();
|
||||
if (parentForm != null)
|
||||
|
Reference in New Issue
Block a user