public void LaunchProcess() { ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.FileName = RuntimeHelper.MapToCurrentLocation("Updater.exe"); startInfo.Arguments += StartUp.defaultSettingFileOnGit + "=\"" + DefaultSettingFileOnGit + "\""; Process.Start(startInfo); }
private string GetCurrentVersion() { var localVersionFile = RuntimeHelper.MapToCurrentLocation(Constants.VersionFileName); var currentVersion = string.Empty; if (File.Exists(localVersionFile)) { currentVersion = File.ReadAllText(localVersionFile); } return(currentVersion); }
public void StartUpdate(string[] args) { _args = args; settingFilePRovider.SettingFilePathOnGitHub = GetParameterValue(defaultSettingFileOnGit); var setting = settingFilePRovider.GetUpdaterSettingsJason(); var appToUpdateExeName = RuntimeHelper.GetParentProcessName(); RuntimeHelper.KillAllProcess(appToUpdateExeName); var app = new AppUdaterExecuter(GetCurrentVersion(), new AppUpdaterFactory().GetAppUpdaters(setting)); app.Execute(); Process.Start(RuntimeHelper.MapToCurrentLocation(appToUpdateExeName)); }