public static void Profiles(string pathApp, string pathData) { if (Engine.Instance.Elevated != null) { string owner = Environment.UserName; Elevated.Command command = new Elevated.Command(); command.Parameters["command"] = "compatibility-profiles"; command.Parameters["path-app"] = pathApp; command.Parameters["path-data"] = pathData; command.Parameters["owner"] = owner; command.DoSync(); } }
public static void Init() { if (m_torDetection) { return; } Elevated.Command c = new Elevated.Command(); c.Parameters["command"] = "tor-get-info"; c.Parameters["name"] = "tor"; string customPath = Engine.Instance.Storage.Get("proxy.tor.path"); if (customPath != "") { c.Parameters["path"] = customPath; } c.Parameters["username"] = Environment.UserName; string torInfo = Engine.Instance.Elevated.DoCommandSync(c); foreach (string line in torInfo.Split('\n')) { if (line.StartsWithInv("Name:")) { m_torProcessName = line.Substring("Name:".Length); } if (line.StartsWithInv("Path:")) { m_torProcessPath = line.Substring("Path:".Length); } if (line.StartsWithInv("CookiePath:")) { m_torCookiePath = line.Substring("CookiePath:".Length); } if (line.StartsWithInv("CookiePasswordHex:")) { m_torCookiePassword = ExtensionsString.HexToBytes(line.Substring("CookiePasswordHex:".Length)); } } m_torDetection = true; }
public static void WindowsRemoveTask() { Elevated.Command command = new Elevated.Command(); command.Parameters["command"] = "compatibility-remove-task"; command.DoSync(); }