diff --git a/Install-EmberkomCloudBackup.ps1 b/Install-EmberkomCloudBackup.ps1 index bb6ca0b..7fbdec9 100644 --- a/Install-EmberkomCloudBackup.ps1 +++ b/Install-EmberkomCloudBackup.ps1 @@ -33,14 +33,14 @@ If ( !(($StatusCode -ge 200) -and ($StatusCode -lt 400)) ) { Write-Output "URL c $Installer = '{0}EmberkomCloudBackup.exe' -f (Get-TempPath) # Delete previous local file if it exists -If ( Test-Path $File ) { Write-Output "Deleting previously downloaded file: ${File}" ; Remove-Item $File -Force -ErrorAction SilentlyContinue} +If ( Test-Path $Installer ) { Write-Output "Deleting previously downloaded file: ${Installer}" ; Remove-Item $Installer -Force -ErrorAction SilentlyContinue } # Download the file -Try { (New-Object System.Net.WebClient).DownloadFile($URL,$File) } -Catch { Write-Error $_.Exception.Message ; Remove-Item $File -Force -ErrorAction SilentlyContinue } +Try { (New-Object System.Net.WebClient).DownloadFile($URL,$Installer) } +Catch { Write-Error $_.Exception.Message ; Remove-Item $Installer -Force -ErrorAction SilentlyContinue } # Make sure the file exists -If ( !(Test-Path $File) ) { Write-Output "There was a problem downloading the file, this script will not continue" ; Return } +If ( !(Test-Path $Installer) ) { Write-Output "There was a problem downloading the file, this script will not continue" ; Return } # # End the workaround