Auto escalate privileges

This commit is contained in:
zone117x
2015-04-19 01:15:02 -06:00
parent 58ea700d37
commit b353022945
5 changed files with 28 additions and 3 deletions

View File

@@ -3,6 +3,7 @@ using NLog.Config;
using NLog.Targets;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
@@ -71,5 +72,12 @@ namespace Jackett
Application.Run(new Main());
}
static public void RestartAsAdmin()
{
var startInfo = new ProcessStartInfo(Application.ExecutablePath.ToString()) { Verb = "runas" };
Process.Start(startInfo);
Environment.Exit(0);
}
}
}