public void RunStartGame(StartGameData data, bool admin) { string startGamePath = StartGameUtil.GetStartGamePath(); ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.FileName = startGamePath; startInfo.Arguments = data.GetAsArguments(); if (admin) { startInfo.Verb = "runas"; } else { //startInfo.RedirectStandardOutput = true; startInfo.UseShellExecute = false; } process = Process.Start(startInfo); //if (!admin) { // process.OutputDataReceived += proc_OutputDataReceived; // process.BeginOutputReadLine(); //} }
public static string[] ScanGames(SearchStorageInfo[] storage) { ClearStartData(); StartGameApp app = new StartGameApp(); app.BeginScanGames(storage); app.WaitForExit(); string dataPath = StartGameUtil.GetStartDataPath(); string data = File.ReadAllText(dataPath); return(JsonConvert.DeserializeObject <string[]>(data)); }
public void BeginMultipleTasks(StartGameData[] tasks, bool admin) { data = StartGameUtil.BuildMultipleTaskData(tasks); RunStartGame(data, admin); }
public void BeginScanGames(SearchStorageInfo[] storage) { data = StartGameUtil.BuildScanGamesData(storage); RunStartGame(data, true); }
public void BeginSymlinkGames(SymlinkGameData[] games) { data = StartGameUtil.BuildSymlinkGameData(games); RunStartGame(data, true); }
public void BeginScanKillMutex(string gameName, int instances, params string[] mutex) { data = StartGameUtil.BuildScanKillMutexData(gameName, instances, mutex); RunStartGame(data, true); }