public static bool CleanAndZipAction(string directoryToClear, string saveFile, string extractionPath) { try { Actions.CleanAndZipAction.CleanAndZip(FileManager.UserApplicationData, directoryToClear, saveFile, extractionPath); return(true); } //Need to run in admin mode catch (UnauthorizedAccessException ex) { Logger.Log("Restarting Updater in admin mode..."); return(StartAsAdmin(new[] { "CleanAndZip", directoryToClear, saveFile, extractionPath, Messaging.ShowAlerts.ToString() })); } catch (InvalidOperationException ioe) { Messaging.AlertError(@"Unzip failed.", ioe); Logger.LogAndShowImmediately(FileManager.UserApplicationData, @"Unzip failed.\n\nException Info:\n" + ioe); return(false); } }