public static void ProcessArguments(string[] args) { if (args.Length >= 1) { var clonePath = args[0]; if (args.Length == 2 && args[1] == "--gui") { // show gui var updaterWindow = new UpdaterWindow(); updaterWindow.ClonePath = clonePath; updaterWindow.ShowDialog(); } else { ConsoleProvider.Attach(); Console.WriteLine("Updating..."); RunUpdate(clonePath); Console.WriteLine("Updating completed."); ConsoleProvider.Detach(); } } }