Skip to content
This repository was archived by the owner on Oct 24, 2021. It is now read-only.

Commit f567bfb

Browse files
committed
Fixes for previously broken Updater
1 parent b528f3e commit f567bfb

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

DS4Windows/DS4Forms/DS4Form.cs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,23 @@ private async void UpdateTheUpdater()
357357
File.Move(exepath + "\\Update Files\\DS4Updater.exe", exepath + "\\DS4Updater.exe");
358358
Directory.Delete(exepath + "\\Update Files");
359359
}
360-
360+
if(FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileBuildPart == 32 &&
361+
(!File.Exists(exepath + "\\DS4Updater.exe") ||
362+
(File.Exists(exepath + "\\DS4Updater.exe") && FileVersionInfo.GetVersionInfo(exepath + "\\DS4Updater.exe").FileBuildPart < 32)))
363+
{
364+
Uri url2 = new Uri("https://github.com/Jays2Kings/DS4Windows/releases/download/v1.4.32/DS4Updater.exe");
365+
WebClient wc2 = new WebClient();
366+
if (appdatapath == exepath || !AdminNeeded())
367+
{
368+
File.Delete(exepath + "\\DS4Updater.exe");
369+
wc2.DownloadFileAsync(url2, exepath + "\\DS4Updater.exe");
370+
}
371+
else
372+
{
373+
MessageBox.Show(Properties.Resources.PleaseDownloadUpdater);
374+
Process.Start("https://github.com/Jays2Kings/DS4Windows/releases/download/v1.4.32/DS4Updater.exe");
375+
}
376+
}
361377
}
362378

363379
void NewVersion()

0 commit comments

Comments
 (0)