Search code examples
httpinstallationinno-setupinno-download-plugin

Authenticated download with Inno Setup


I have files on my HTTP server which should be downloaded. I can properly download them from usual HTTP-server, but my server asks for authorization during download (this download should be protected).

How can I include login/password information to exe-file or to force Inno Setup to show authorization window to user?

Because now Inno Setup just shows me error window: access denied, with no possibility to enter login/password.

I'm using Inno Download Plugin for this purpose.


Solution

  • Use idpSetLogin function to set the credentials:

    procedure idpSetLogin(login, password: String);                
      external 'idpSetLogin@files:idp.dll cdecl';
    

    If you want to query the user for the credentials, you can use CreateInputQueryPage support function.