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:
parent
3da29287d7
commit
b6f883ec38
@ -88,7 +88,7 @@ public class InstallerUpdateInfo : ReactiveObject
|
|||||||
|
|
||||||
var progress = new Progress<double>(x => DownloadProgress = (int)x);
|
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)
|
if (file == null || !file.Exists)
|
||||||
{
|
{
|
||||||
|
@ -22,6 +22,9 @@ Start-BitsTransfer -Source $source -Destination $destination -DisplayName "Updat
|
|||||||
|
|
||||||
Remove-Module -Name BitsTransfer
|
Remove-Module -Name BitsTransfer
|
||||||
|
|
||||||
|
# remove the new installer from the cache folder after it is copied
|
||||||
|
Remove-Item -Path $source
|
||||||
|
|
||||||
Start-Process $destination
|
Start-Process $destination
|
||||||
|
|
||||||
Write-Host "Done"
|
Write-Host "Done"
|
Loading…
x
Reference in New Issue
Block a user