#348, insufficient delay causes failure to upgrade

This commit is contained in:
Kang Yu 2024-08-28 15:52:01 -07:00
parent 1b4f62ee7d
commit e6f11c354d

View file

@ -266,7 +266,7 @@ namespace PersistentWindows.SystrayShell
upgradeDownloaded[latestVersion] = true;
string batFile = Path.Combine(Program.AppdataFolder, $"pw_upgrade.bat");
string content = "timeout /t 5 /nobreak > NUL";
string content = "timeout /t 10 /nobreak > NUL";
content += $"\ncopy /Y \"{dst_dir}\\*.*\" \"{install_dir}\"";
content += "\nstart \"\" /B \"" + Path.Combine(install_dir, Application.ProductName) + ".exe\" " + Program.CmdArgs;
File.WriteAllText(batFile, content);