PowerPack, PowerShell
comments 3

Internet explorer plugin to complement BITS File Transfer PowerPack

Update: If you have issues running this IE plugin, please read the update here.

One shortcome of BITS File Transfer PowerPack is that you need to manually collect the source URL from web pages and then use that URL in start file transfer action. This can be quite painful depending on how many such URLs you need to copy. Long ago, Microsoft posted a BITS IE plugin sample written in C++ on MSDN. This plugin provides an option in the IE context menu for hyperlinks to download the content using BITS. That is a nice option. Instead of using the SDK sample as is, I just created a PowerShell script to replace the C++ executable so that this plugin can be used on any system with PowerShell 2.0 and BITS 4.0.

How to enable this plugin?
First, download the plugin zip file below

[download id=”15″ format=”4″]

This package contains two files

1. BITSIEPlugin.htm
This has some javascript code to invoke the PowerShell script when you select “Download using BITS” option in the IE context menu for a hyperlink.

2. Start-IETransfer.ps1
This is the PowerShell code that loads BITSTransfer module and starts the actual file transfer process.

To install the plugin,

1. Extract the downloaded package to C:\Windows\System32
Note: If you want to store these files in a seperate path, you need to edit BITSIEPlugin.htm and make sure you put the correct path in there

2. Open Registry editor and add “Download Using BITS” key under HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\

3. Now, add the following REG_DWORD value
Name: Contexts
Value: 0x00000020

4. Change the value of (Default) to C:\windows\System32\BITSIEPlugin.htm

Overall, this is how your registry should look after the changes are complete.

IE Registry Changes

IE Registry Changes

That is it. Now, restart you IE and you will see an option to “Download using BITS” whenever you right click on a hyperlink. There is no validation done to make sure that the URL you selected is a file download. This plugin assumes that it is.

IE context menu

IE context menu

All the jobs started using this method can also be monitored using BITS File Transfer PowerPack. Please feel free leave any feedback here.

Filed under: PowerPack, PowerShell

by

Ravikanth is a principal engineer and the lead architect for Microsoft and VMware virtualized and hybrid cloud solutions within the Infrastructure Solutions Group at Dell EMC. He is a multi-year recipient of Microsoft Most Valuable Professional (MVP) award in Windows PowerShell (CDM) and Microsoft Azure. Ravikanth is the author of Windows PowerShell Desired State Configuration Revealed (Apress) and leads Bangalore PowerShell and Bangalore IT Pro user groups. He can be seen speaking regularly at local user group events and conferences in India and abroad.