Skip to content

Commit

Permalink
Restart with admin permissions when needed on Auto Update #3568
Browse files Browse the repository at this point in the history
  • Loading branch information
seerge committed Jan 8, 2025
1 parent 4260f74 commit 9ba9f53
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion app/AutoUpdate/AutoUpdateControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,15 @@ async void AutoUpdate(string requestUri)

using (WebClient client = new WebClient())
{
client.DownloadFile(uri, zipLocation);
try
{
client.DownloadFile(uri, zipLocation);
}
catch (Exception ex)
{
Logger.WriteLine(ex.Message);
ProcessHelper.RunAsAdmin("autoupdate");
}

Logger.WriteLine(requestUri);
Logger.WriteLine(exeDir);
Expand Down

0 comments on commit 9ba9f53

Please sign in to comment.