diff --git a/ReleaseUpdater/ReleaseUpdaterFacade.cs b/ReleaseUpdater/ReleaseUpdaterFacade.cs index 9f2f2df..6b69f84 100644 --- a/ReleaseUpdater/ReleaseUpdaterFacade.cs +++ b/ReleaseUpdater/ReleaseUpdaterFacade.cs @@ -72,7 +72,7 @@ public static class ReleaseUpdaterFacade /// Обновление через внешний Updater.exe. /// public static async Task UpdateWithExternalAsync( - string apiUrl, string? token, string installPath, string appExe, string versionOrLatest = "latest") + string apiUrl, string? token, string installPath, string appExe, string versionOrLatest = "latest", string? updaterExePath = null) { try { @@ -88,12 +88,12 @@ public static class ReleaseUpdaterFacade BeforeInstall?.Invoke(); - var updaterExe = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Updater.exe"); + if (updaterExePath == null) updaterExePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Updater.exe"); var args = $"--zip \"{zipPath}\" --installPath \"{installPath}\" --appExe \"{appExe}\""; var process = Process.Start(new ProcessStartInfo { - FileName = updaterExe, + FileName = updaterExePath, Arguments = args, UseShellExecute = true, WorkingDirectory = AppDomain.CurrentDomain.BaseDirectory