private async Task Uninstall() { if (GeneralInfo.IsGameDirValid()) { CurrentInstallState = InstallState.Uninstalling; SetBrushesForUninstalling(); await SetupInstallProcess(); //Reload tracker GeneralInfo.LoadTracker(); Uninstall uninstall = new Uninstall(this, FileIO, fileManager); //uninstall.Start(); //uninstall.SaveFiles(); try { await Task.Run(uninstall.Start); await Task.Run(uninstall.Uninstall_JungleFiles); await Task.Run(uninstall.SaveFiles); } catch (Exception ex) { SaveErrorLog(ex.ToString()); MessageBox.Show(string.Format("A critical exception occured while uninstalling that cannot be recovered from. The installer will now close.\n\nException:{0}", ex.ToString()), "Critical Exception", MessageBoxButton.OK, MessageBoxImage.Error); ShutdownApp(); } GeneralInfo.DeleteTracker(); MessageBox.Show("The mod was successfully uninstalled.", GeneralInfo.InstallerXmlInfo.InstallerName, MessageBoxButton.OK, MessageBoxImage.Information); ShutdownApp(); } else { MessageBox.Show(String.Format("The directory where the game was installed could not be located.\n\nSelect the correct directory using the Browse button and then try again. It should be named \"DB Xenoverse 2\"."), "Invalid Path", MessageBoxButton.OK, MessageBoxImage.Warning); } }