Share via


BizTalk Server: Script to download prerequisite CAB-files

Introduction

When installing BizTalk Server it is possible to provide a prerequisite CAB file. This file varies based on BizTalk version, Windows version and 64/32-bit edition of the latter. It is possible to locate and download this file manually. This article will describe a PowerShell script (available in TechNet Gallery) that downloads the correct CAB file automatically based on user input.

For example, with BizTalk Server 2016 the following software may be part of the redistributable CAB file:

  • Microsoft SQL XML 4.0 with Service Pack 1
  • Microsoft Office Web Components
  • Microsoft ADO MD.Net 9.0
  • Microsoft ADO MD.Net 10.0

The CAB-files are specific for each version of BizTalk Server. The image below illustrates the dialog box during installation of BizTalk Server 2016.

Details

The entire script is available below. There is one section per BizTalk Server version, and based on the user's selection of Operating System, the applicable 64 or 32-bit version is downloaded. Only English editions are supported in this script.

<#
.SYNOPSIS
Download BizTalk Server prerequisite CAB-file (English)
.DESCRIPTION
This script downloads the prerequisite CAB-file for BizTalk Server. User is prompted for BizTalk and Windows version and bits
.EXAMPLE
./DownloadBizTalkCAB.ps1
.NOTES
File will be downloaded in current user's Download folder
#>
cls
 
# Get filename from URL
function getfilename($source) {
    $pieces=$source.split("/") 
    $piecescount=$pieces.Count 
    $filename=$pieces[$piecescount-1] 
    return $filename
}
 
$BTversion = Read-Host("Which BizTalk version are you installing? Enter 2016, 2013R2, 2013, 2010, 2009 or 2006R2")
$bits = 64
 
# BizTalk Server 2016
if ($BTversion -eq "2016") {
    $winversion = Read-Host("Which Windows version are you using? Enter 2016, 2012R2, 10 or 8.1")
    switch ($winversion) {
        "2016" { $source = "http://download.microsoft.com/download/4/2/E/42E95EB2-5B2A-495F-A407-323799CE3FD2/BtsRedistW2K12R2EN64.CAB" }
        "2012R2" { $source = "http://download.microsoft.com/download/D/2/F/D2F133EC-9DA3-40E7-89E2-C7B5EBDC176A/BtsRedistW2K12R2EN64.CAB" }
        "10" { $bits = Read-Host("64 or 32-bit version of Windows? Enter 64 or 32")
            switch ($bits) {
                64 { $source = "http://download.microsoft.com/download/1/9/E/19E8B896-2755-4C14-A01C-90BC4A2A4692/BtsRedistW2K12R2EN64.cab" }
                32 { $source = "http://download.microsoft.com/download/5/5/4/554E1119-0E9D-46F5-8457-269575DAC657/BtsRedistWin81EN32.cab" }
            }
        }
        "8.1" { $bits = Read-Host("64 or 32-bit version of Windows? Enter 64 or 32")
            switch ($bits) {
                64 { $source = "http://download.microsoft.com/download/A/4/F/A4FC6FD6-1F8D-4AF9-A148-A5205E605684/BtsRedistW2K12R2EN64.cab" }
                32 { $source = "http://download.microsoft.com/download/C/D/1/CD183203-AC5F-409D-9EF8-C265D1725B85/BtsRedistWin81EN32.cab" }
            }
        }
        default { Write-Host("`nInvalid or unsupported Windows version entered. Exiting") -fore Red
                    exit }
    }
}
# BizTalk Server 2013R2
elseif ($BTversion -eq "2013R2") {
    $winversion = Read-Host("Which Windows version are you using? Enter 2012R2, 2012, 8.1 or 7")
    switch ($winversion) {
        "2012R2" { $source = "http://download.microsoft.com/download/4/D/A/4DA76382-88EC-46BD-85F1-785185004BE9/BtsRedistW2K12EN64.cab" }
        "2012" { $source = "http://download.microsoft.com/download/4/D/A/4DA76382-88EC-46BD-85F1-785185004BE9/BtsRedistW2K12EN64.cab" }
        "8.1" { $bits = Read-Host("64 or 32-bit version of Windows? Enter 64 or 32")
            switch ($bits) {
                64 { $source = "http://download.microsoft.com/download/4/D/A/4DA76382-88EC-46BD-85F1-785185004BE9/BtsRedistWin8EN64.cab" }
                32 { $source = "http://download.microsoft.com/download/2/7/C/27CE697C-9869-42DB-A22A-95B76DE842AE/BtsRedistWin8EN32.cab" }
            }
        }
        "7" { $bits = Read-Host("64 or 32-bit version of Windows? Enter 64 or 32")
            switch ($bits) {
                64 { $source = "http://download.microsoft.com/download/4/D/A/4DA76382-88EC-46BD-85F1-785185004BE9/BtsRedistWin7EN64.cab" }
                32 { $source = "http://download.microsoft.com/download/2/7/C/27CE697C-9869-42DB-A22A-95B76DE842AE/BtsRedistWin7EN32.cab" }
            }
        }
        default { Write-Host("`nInvalid or unsupported Windows version entered. Exiting") -fore Red
                    exit }
    }
}
# BizTalk Server 2013
elseif ($BTversion -eq "2013") {
    $winversion = Read-Host("Which Windows version are you using? Enter 2012R2, 2008R2, 8 or 7")
    switch ($winversion) {
        "2012" { $source = "http://download.microsoft.com/download/2/7/C/27CE697C-9869-42DB-A22A-95B76DE842AE/BtsRedistW2K12EN64.cab" }
        "2008R2" { $source = "http://download.microsoft.com/download/2/7/C/27CE697C-9869-42DB-A22A-95B76DE842AE/BtsRedistW2K8R2EN64.cab" }
        "8" { $bits = Read-Host("64 or 32-bit version of Windows? Enter 64 or 32")
            switch ($bits) {
                64 { $source = "http://download.microsoft.com/download/2/7/C/27CE697C-9869-42DB-A22A-95B76DE842AE/BtsRedistWin8EN64.cab" }
                32 { $source = "http://download.microsoft.com/download/2/7/C/27CE697C-9869-42DB-A22A-95B76DE842AE/BtsRedistWin8EN32.cab" }
            }
        }
        "7" { $bits = Read-Host("64 or 32-bit version of Windows? Enter 64 or 32")
            switch ($bits) {
                64 { $source = "http://download.microsoft.com/download/2/7/C/27CE697C-9869-42DB-A22A-95B76DE842AE/BtsRedistWin7EN64.cab" }
                32 { $source = "http://download.microsoft.com/download/2/7/C/27CE697C-9869-42DB-A22A-95B76DE842AE/BtsRedistWin7EN32.cab" }
            }
        }
        default { Write-Host("`nInvalid or unsupported Windows version entered. Exiting") -fore Red
                    exit }
    }
}
# BizTalk Server 2010
elseif ($BTversion -eq "2010") {
    $winversion = Read-Host("Which Windows version are you using? Enter 2008R2, 2008, 7 or Vista")
    switch ($winversion) {
        "2008R2" { $source = "http://download.microsoft.com/download/2/D/1/2D1B87F5-D9FF-40F4-BC56-B9B290C0E6B3/Bts2010Win2K8R2EN64.cab" }
        "2008" { $bits = Read-Host("64 or 32-bit version of Windows? Enter 64 or 32")
            switch ($bits) {
                64 { $source = "" }
                32 { $source = "http://download.microsoft.com/download/F/7/7/F773381D-3AE6-4B25-91C1-A3424E272ABD/Bts2010Win2K8EN32.cab" }
            }
        }
        "7" { $bits = Read-Host("64 or 32-bit version of Windows? Enter 64 or 32")
            switch ($bits) {
                64 { $source = "http://download.microsoft.com/download/5/2/0/520FFC0E-04F6-4143-BD66-AC0D96291F4B/Bts2010Win7EN64.cab" }
                32 { $source = "http://download.microsoft.com/download/9/5/7/957242A4-63E1-4E91-81F1-ABDAC4FFD017/Bts2010Win7EN32.cab" }
            }
        }
        "Vista" { $bits = Read-Host("64 or 32-bit version of Windows? Enter 64 or 32")
            switch ($bits) {
                64 { $source = "http://download.microsoft.com/download/E/E/2/EE2CB848-3669-4AAF-9941-22E370939496/Bts2010VistaEN64.cab" }
                32 { $source = "" }
            }
        }
        default { Write-Host("`nInvalid or unsupported Windows version entered. Exiting") -fore Red
                    exit }
    }
}
# BizTalk Server 2009
elseif ($BTversion -eq "2009") {
    $winversion = Read-Host("Which Windows version are you using? Enter 2008, 2003, Vista or XP")
    $bits = Read-Host("64 or 32-bit version of Windows? Enter 64 or 32")
    switch ($winversion) {
        "2008" { switch ($bits) {
                64 { $source = "" }
                32 { $source = "http://download.microsoft.com/download/E/6/5/E65125DE-95B1-456E-A32E-54331C9D0CE0/BTSRedistW2K8EN32.cab" }
             }
        }
        "2003" { switch ($bits) {
                64 { $source = "http://download.microsoft.com/download/6/C/1/6C1723C0-576E-454E-AA86-A5D2AF9A6A27/BTSRedistW2K3EN64.cab" }
                32 { $source = "" }
             }
        }
        "Vista" { switch ($bits) {
                64 { $source = "" }
                32 { $source = "" }
             }
        }
        "XP" { switch ($bits) {
                64 { $source = "" }
                32 { $source = "" }
              }
        }
        default { Write-Host("`nInvalid or unsupported Windows version entered. Exiting") -fore Red
                    exit }
    }
}
# BizTalk Server 2006R2
elseif ($BTversion -eq "2006R2") {
    $winversion = Read-Host("Which Windows version are you using? Enter 2003, Vista or XP")
    $bits = Read-Host("64 or 32-bit version of Windows? Enter 64 or 32")
    switch ($winversion) {
        "2003" { switch ($bits) {
                64 { $source = "http://download.microsoft.com/download/e/d/8/ed897961-7213-4816-be92-9178bea8e5c0/BtsRedistW2k3EN64.cab" }
                32 { $source = "http://download.microsoft.com/download/e/d/8/ed897961-7213-4816-be92-9178bea8e5c0/BtsRedistW2k3EN32.cab" }
             }
        }
        "Vista" { switch ($bits) {
                64 { $source = "http://download.microsoft.com/download/e/d/8/ed897961-7213-4816-be92-9178bea8e5c0/BtsRedistVistaEN64.cab" }
                32 { $source = "http://download.microsoft.com/download/e/d/8/ed897961-7213-4816-be92-9178bea8e5c0/BtsRedistVistaEN32.cab" }
             }
        }
        "XP" { switch ($bits) {
                64 { $source = "http://download.microsoft.com/download/e/d/8/ed897961-7213-4816-be92-9178bea8e5c0/BtsRedistXpEN64.cab" }
                32 { $source = "http://download.microsoft.com/download/e/d/8/ed897961-7213-4816-be92-9178bea8e5c0/BtsRedistXpEN32.cab" }
              }
        }
        default { Write-Host("`nInvalid or unsupported Windows version entered. Exiting") -fore Red
                    exit }
    }
}
# Invalid Windows version
else {
    Write-Host("`nInvalid or unsupported Windows version entered. Exiting") -fore Red
    exit
}
Write-Host("`nDownloading BizTalk Server $BTversion prerequisite CAB for Windows $winversion - $bits bit edition...") -Fore Green
 
try {
    # Destination downloadfolder
    $destination = $env:USERPROFILE + "\Downloads\"
    $destination += getfilename $source
 
    # Download CAB-file
    Invoke-WebRequest $source -OutFile $destination
 
    Write-Host("`nFile download complete: " + $destination)
}
catch {
    Write-Host("`Download failed. Note that some URLs are not available, check the script source. If the URL is there, verify your Internet connection and try again.") -fore Red
    exit
}

The image below shows one sample run of the script. The user is first prompted for BizTalk version, and then Windows version. The user is only prompted for available and supported Windows versions, based on the selected BizTalk Server version. The applicable CAB-file is eventually available in the user's Downloads folder. Note that the user is not prompted for 64/32-bit version when only one of them is available.

All BizTalk Server versions since 2006R2 are available. The download URLs are based on this article. Note that many links (especially for older versions) are broken. These have not been included in the script.

Instructions

Download the script here. Run the script in an admin PowerShell console. There are no parameters. Answer the questions to get the correct CAB-file. The downloaded file will be available in the user's Downloads folder. To get more than one CAB-file, just run the script again.

See Also

Read suggested related topics:

Another important place to find an extensive amount of BizTalk related articles is the TechNet Wiki itself. The best entry point is BizTalk Server Resources on the TechNet Wiki