diff --git a/AA2Install/7z.cs b/AA2Install/7z.cs index d46c285..3f0b80f 100644 --- a/AA2Install/7z.cs +++ b/AA2Install/7z.cs @@ -6,6 +6,7 @@ using System.Diagnostics; using System.Windows.Forms; using System.Text.RegularExpressions; +using System.Threading; namespace AA2Install.Archives { @@ -37,6 +38,7 @@ public static Mod Index(string filename, bool miscFiles = false) while (!p.HasExited) { Application.DoEvents(); + Thread.Sleep(100); } p.WaitForExit(); } @@ -108,6 +110,7 @@ public static string Extract(string filename, string dest = "") while (!p.HasExited) { Application.DoEvents(); + Thread.Sleep(100); } } return dest; @@ -138,6 +141,7 @@ public static string ExtractWildcard(string filename, string wildcard, string de while (!p.HasExited) { Application.DoEvents(); + Thread.Sleep(100); } } return Paths.TEMP; @@ -168,6 +172,7 @@ public static bool Compress(string filename, string workingdir, string directory while (!p.HasExited) { Application.DoEvents(); + Thread.Sleep(100); } } return System.IO.File.Exists(filename); diff --git a/AA2Install/formMain.cs b/AA2Install/formMain.cs index 60c2afd..2cbd6aa 100644 --- a/AA2Install/formMain.cs +++ b/AA2Install/formMain.cs @@ -736,6 +736,7 @@ public bool inject(bool createBackup = false, bool checkConflicts = true, bool s while (bb.IsBusy) { Application.DoEvents(); + Thread.Sleep(100); } } else