public void StartHearthstone() { try { var wnd = HearthstoneHelper.GetHearthstoneWindow(); if (wnd != IntPtr.Zero) { return; } var hsLocation = String.Empty; using (var settings = new HearthstoneRegistrySettings()) { hsLocation = settings.BattleNetLocation; if (String.IsNullOrEmpty(hsLocation) || !File.Exists(hsLocation)) { // try default var def = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), "Battle.net"); def = Path.Combine(def, "Battle.net Launcher.exe"); if (File.Exists(def)) { settings.BattleNetLocation = hsLocation = def; } else { if (AskHearthstoneLocation(out hsLocation)) { settings.BattleNetLocation = hsLocation; } } } } if (File.Exists(hsLocation)) { var start = new ProcessStartInfo(hsLocation) { Arguments = "--exec=\"launch WTCG\"" }; Process.Start(start); } } catch (Exception) { // TODO: check, show error message instead of ignoring exception } }