; -- CodeDownloadFiles.iss -- ; ; This script shows how the [Files] section can be used to download files and ; archives while showing the download and extraction progress to the user. ; ; Archives will be downloaded to temporary files at the start of the Preparing ; To Install step. Other files will be downloaded directly to their destination ; during the actual installation. ; ; To verify the downloaded files and archives, this script shows two methods: ; -For innosetup-latest.exe and MyProg-ExtraReadmes.7z: using Inno Setup ; Signature Tool, the [ISSigKeys] section, and the AddWithISSigVerify support ; function ; -For iscrypt.dll: using a simple SHA-256 hash check ; Using the Inno Setup Signature Tool has the benefit that the script does not ; need to be changed when the downloaded file or archive changes, so any ; installers built will also keep working (they are "evergreen") [Setup] AppName=My Program AppVersion=1.5 WizardStyle=modern DefaultDirName={autopf}\My Program DefaultGroupName=My Program UninstallDisplayIcon={app}\MyProg.exe OutputDir=userdocs:Inno Setup Examples Output ArchiveExtraction=full ;Use "ArchiveExtraction=enhanced" if all your archives are .7z files ;Use "ArchiveExtraction=enhanced/nopassword" if all your archives are not password-protected [ISSigKeys] Name: mykey; RuntimeID: def02; \ KeyID: "def020edee3c4835fd54d85eff8b66d4d899b22a777353ca4a114b652e5e7a28"; \ PublicX: "515dc7d6c16d4a46272ceb3d158c5630a96466ab4d948e72c2029d737c823097"; \ PublicY: "f3c21f6b5156c52a35f6f28016ee3e31a3ded60c325b81fb7b1f88c221081a61" [Files] ; Place any regular files here Source: "MyProg.exe"; DestDir: "{app}" Source: "MyProg.chm"; DestDir: "{app}" Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme ; These files will be downloaded and verified Source: "https://jrsoftware.org/download.php/is.exe?dontcount=1"; DestName: "innosetup-latest.exe"; DestDir: "{app}"; \ ExternalSize: 7_000_000; Flags: external download ignoreversion issigverify Source: "https://jrsoftware.org/download.php/iscrypt.dll?dontcount=1"; DestName: "ISCrypt.dll"; DestDir: "{app}"; \ Hash: "2f6294f9aa09f59a574b5dcd33be54e16b39377984f3d5658cda44950fa0f8fc"; \ ExternalSize: 2560; Flags: external download ignoreversion ; This file will be downloaded, verified and extracted Source: "https://jrsoftware.org/download.php/myprog-extrareadmes.7z"; DestName: "MyProg.ExtraReadmes.7z"; DestDir: "{app}"; \ ExternalSize: 269; Flags: external download extractarchive recursesubdirs ignoreversion issigverify ; This file will be downloaded and extracted without verificaton Source: "https://github.com/jrsoftware/issrc/archive/refs/heads/main.zip"; DestName: "issrc-main.zip"; DestDir: "{app}"; \ ExternalSize: 15_000_000; Flags: external download extractarchive recursesubdirs ignoreversion [Icons] Name: "{group}\My Program"; Filename: "{app}\MyProg.exe"