diff --git a/generic/Run/HelperFunctions.ps1 b/generic/Run/HelperFunctions.ps1 index 82b52f7..f006585 100644 --- a/generic/Run/HelperFunctions.ps1 +++ b/generic/Run/HelperFunctions.ps1 @@ -605,6 +605,18 @@ function Download-File { [switch] $dontOverwrite ) + $replaceUrls = @{ + "https://go.microsoft.com/fwlink/?LinkID=844461" = "https://bcartifacts.azureedge.net/prerequisites/DotNetCore.1.0.4_1.1.1-WindowsHosting.exe" + "https://download.microsoft.com/download/C/9/E/C9E8180D-4E51-40A6-A9BF-776990D8BCA9/rewrite_amd64.msi" = "https://bcartifacts.azureedge.net/prerequisites/rewrite_2.0_rtw_x64.msi" + "https://download.microsoft.com/download/5/5/3/553C731E-9333-40FB-ADE3-E02DC9643B31/OpenXMLSDKV25.msi" = "https://bcartifacts.azureedge.net/prerequisites/OpenXMLSDKv25.msi" + "https://download.microsoft.com/download/A/1/2/A129F694-233C-4C7C-860F-F73139CF2E01/ENU/x86/ReportViewer.msi" = "https://bcartifacts.azureedge.net/prerequisites/ReportViewer.msi" + "https://download.microsoft.com/download/1/3/0/13089488-91FC-4E22-AD68-5BE58BD5C014/ENU/x86/SQLSysClrTypes.msi" = "https://bcartifacts.azureedge.net/prerequisites/SQLSysClrTypes.msi" + } + + if ($replaceUrls.ContainsKey($sourceUrl)) { + $sourceUrl = $replaceUrls[$sourceUrl] + } + if (Test-Path $destinationFile -PathType Leaf) { if ($dontOverwrite) { return