Internet explorer plugin to complement BITS File Transfer PowerPack

by ravikanthchaganti on December 10, 2009
415 Views

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

BITS File Transfer IE Plugin (Downloaded 269 times)

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: 0×00000020

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.

Related Posts

{ 2 comments… read them below or add one }

wayne December 19, 2009 at 12:39 am

I installed on my Windows 7 workstation, but on a test server Windows Server 2008 Standard SP2 I am having problems. I didn’t have the MenuExt key so i created it and add the other as you suggest. Everything looks good but the prompt for the destination doesn’t popup and no job is created.
have you tested on Windows Server 2k8?

ravikanthchaganti December 19, 2009 at 11:00 am

@Wayne
That could be because of two reasons.
1. You are using x64 OS and the IE is 32bit. In this case, IE tries to load the extension from C:\windows\SysWow64 folder and you need to copy the files to that folder too.
2. You have not enabled PowerShell Script Execution Policy. Since this script is not signed, you need to ByPass the execution policy on Windows Server OS

{ 1 trackback }

Leave a Comment

Previous post:

Next post: