IE custom download manager (CSIEDownloadManager)

The code sample demonstrates how to implement a custom download manager for IE. When IE starts to download a file, the custom CSWebDownloader.exe application will be launched to download the file.

C# (117.1 KB)
4.7 Star
14,498 times
Add to favorites
E-mail Twitter Digg Facebook
Sign in to ask a question

  • Registry key is not created... Cannot see this is working
    1 Posts | Last post July 05, 2016
    • I looked everywhere for such example and was very happy to find this one with all the documentation :)
      I have downloaded this example and simply built and then install it. When I go to the registry location I did not see that the class was registered. 
      Do I need to do anything else besides installing it?
      Tried RegSvr on the manager which sis not work either.
      Would appreciate very much your help
  • How to find out if the dllregistered correctly.
    1 Posts | Last post December 29, 2014
    • Hi, I have made a class library project in c# used an interface IDownloadManager and an other class IEDownloadManager which is extending the Download method( i just removd code to open any user interface i just want to call this method in the first place so i made a small file with datetime.Now in D drive and return 0; if Download methods get called). used the same classes in visual studio 2013 for windows 8.1 IE 11... I used the same GUID as in this sample code.for both of the classes. I built the project and got dll in the debug folder of the project. I registered that dll using Regasm and i can see in the reg editor that CLSID is added under internet explorer. 
      Now the Problem is i open internet explorer nothing changed.. default UI gets called and works the same way which means my download function is not getting called. I made a constructor of the class and put that making file code in constructor still the code doesnt get called.
      How to find the problem and how to debug the Download method or extended class... please help... 
      Thanks in advance 
  • How to extend CSIEDownloadManager to automate downloads?
    2 Posts | Last post October 01, 2011
    • We have a WebBrowser Control application that must automatically download some PDFs.  A form must be posted back to the server in order to trigger a PDF download. The name of the PDF file is not known until is arrives at the client.
      We need:
      •	To change the target download save directory programmatically prior to each download.
      •	To have MSIE automatically save the downloaded file to the target directory without the OPEN or SAVE prompt.
      •	A handle to the downloaded file so that it can be renamed programmatically.
      Any advice you can provide on how to extend CSIEDownloadManager to satisfy these requirements would be appreciated.
    • First, let me say that this is some really good, well-commented sample code.  I installed it as instructed and MSIE popup up the CSWebDownloader form.  I added a setting to CSWebDownloader so that I good change the download target directory.  But, now I'm stuck.  The download manager is invoked before the download is requested from the server.  In our case, that request is a form that is posted with input parameters.  I do not know whether the form input parameters can be accessed from inside IDownloadManager.Download method. Without the input parameters, the form cannot be posted back correctly.
      Any advice you might give me on how to solve this problem would be appreciated.