diff --git a/SPTInstaller/Models/InstallerUpdateInfo.cs b/SPTInstaller/Models/InstallerUpdateInfo.cs index 2b6e956..bb5769c 100644 --- a/SPTInstaller/Models/InstallerUpdateInfo.cs +++ b/SPTInstaller/Models/InstallerUpdateInfo.cs @@ -88,7 +88,7 @@ public class InstallerUpdateInfo : ReactiveObject var progress = new Progress(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) { diff --git a/SPTInstaller/Resources/update.ps1 b/SPTInstaller/Resources/update.ps1 index 7e75bec..5cb9e24 100644 --- a/SPTInstaller/Resources/update.ps1 +++ b/SPTInstaller/Resources/update.ps1 @@ -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" \ No newline at end of file