update updater

using download file async since a hash isn't needed and also remove new installer from cache when done updating
This commit is contained in:
IsWaffle 2023-09-21 10:55:25 -04:00
parent 3da29287d7
commit b6f883ec38
2 changed files with 4 additions and 1 deletions

View File

@ -88,7 +88,7 @@ public class InstallerUpdateInfo : ReactiveObject
var progress = new Progress<double>(x => DownloadProgress = (int)x);
var file = await DownloadCacheHelper.GetOrDownloadFileAsync("SPTInstller.exe", NewInstallerUrl, progress);
var file = await DownloadCacheHelper.DownloadFileAsync("SPTInstller.exe", NewInstallerUrl, progress);
if (file == null || !file.Exists)
{

View File

@ -22,6 +22,9 @@ Start-BitsTransfer -Source $source -Destination $destination -DisplayName "Updat
Remove-Module -Name BitsTransfer
# remove the new installer from the cache folder after it is copied
Remove-Item -Path $source
Start-Process $destination
Write-Host "Done"