Inno Setup: Install file from Internet

Ashish Sharma picture Ashish Sharma · Jul 31, 2011 · Viewed 16.5k times · Source

I am using Inno Setup to distribute my application. Is it possible to check in Inno Script for a particular condition and download and install some file from internet if required.

Answer

Jens A. Koch picture Jens A. Koch · Mar 28, 2014

Inno Download Plugin by Mitrich Software.

  • It's an InnoSetup script and DLL, which allows you to download files as part of your installation.
  • It supports FTP, HTTP and HTTPS.
  • It's kind of a drop-in replacement for InnoTools Downloader. Only few changes required.
  • It brings a decent download display and HTTPS and Mirror(s) support.

Example:

#include <idp.iss>

[Files]
Source: "{tmp}\file.zip"; DestDir: "{app}"; Flags: external; ExternalSize: 1048576

[Code]
procedure InitializeWizard();
begin
  idpAddFileSize('http://127.0.0.1/file.zip', ExpandConstant('{tmp}\file.zip'), 1048576);

  idpDownloadAfter(wpReady);
end.