Authenticated proxy support for DownloadFile

DownloadFile subroutine gets credentials from system settings.
This commit is contained in:
arzezniczak
2017-05-11 16:04:53 +02:00
committed by Thomas Krijnen
parent 0f825b7050
commit 97c5126a77
+1 -1
View File
@@ -442,7 +442,7 @@ exit /b %IFCOS_SCRIPT_RET%
pushd "%2"
if not exist "%~3". (
call cecho.cmd 0 13 "Downloading %DEPENDENCY_NAME% into %~2."
powershell -Command "$webClient = new-object System.Net.WebClient; $webClient.DownloadFile('%1', '%3')"
powershell -Command "$webClient = new-object System.Net.WebClient; $webClient.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials; $webClient.DownloadFile('%1', '%3')"
REM Old wget version in case someone has problem with PowerShell: wget --no-check-certificate %1
) else (
call cecho.cmd 0 13 "%DEPENDENCY_NAME% already downloaded. Skipping."