From a64d3ab4bc0e9e66493feff2a5765d1cc1bcb72c Mon Sep 17 00:00:00 2001 From: CreepyCrafter24 <33260128+CreepyCrafter24@users.noreply.github.com> Date: Wed, 8 Apr 2020 18:15:21 +0200 Subject: [PATCH] Sleep before install --- Installer/Program.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Installer/Program.cs b/Installer/Program.cs index 2bccb99..f741122 100644 --- a/Installer/Program.cs +++ b/Installer/Program.cs @@ -4,6 +4,7 @@ using System.IO.Compression; using System.Linq; using System.Net; using System.Security.Cryptography; +using System.Threading; using System.Windows.Forms; using System.Xml.Linq; using UpToolLib; @@ -19,11 +20,11 @@ namespace Installer [STAThread] private static void Main(string[] args) { - MutexLock.Lock(); try { if (!args.Any(s => new[] {"install", "i"}.Contains(s.TrimStart('-', '/').ToLower()))) { + MutexLock.Lock(); Application.SetHighDpiMode(HighDpiMode.SystemAware); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); @@ -31,6 +32,8 @@ namespace Installer } else { + Thread.Sleep(2000); + MutexLock.Lock(); ExternalFunctionalityManager.Init(new UtLibFunctionsCli()); WebClient client = new WebClient(); Console.WriteLine("Downloading metadata");