Inno Setup: Download on demand

I use Inno Setup Compiler 5.5.5 (together with Inno Script Studio) to create a setup program for my application. A part of the application files is a helper program MyHelperProgram.exe. However, MyHelperProgram.exe should not be contained in the setup program but downloaded from the Internet on demand. This means that:

If MyHelperProgram.exe does not yet exist in the application directory of my application OR if my application is to be installed the first time on the user's computer: Automatically download and install MyHelperProgram.exe in the directory of my application.

If MyHelperProgram.exe already exists in the application directory (i.e. when the user installs a newer version of my application over an older version of my application) but there is no newer version of MyHelperProgram.exe on my website: Don't download and install MyHelperProgram.exe

If MyHelperProgram.exe already exists in the application directory (i.e. when the user installs a newer version of my application over an older version of my application) but there IS a newer version of MyHelperProgram.exe on my website: Automatically download and install MyHelperProgram.exe

How can I add this behavior in Inno Script Studio?
PeterDelphinAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Isabella PengCommented:
You can use the InnoTools Downloader or Inno Download Plugin program from Inno Setup Third-Party Files options.It will help you to download files from any location.I tried it for English language.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PeterDelphinAuthor Commented:
Thanks, but could you give me a working scripting example?
0
Isabella PengCommented:
var
  MyProgChecked1:  Boolean;
  var ResultStr1: String;
  var State: boolean;
 
procedure InitializeWizard();
begin
State:= False;
ResultStr1:= '';
itd_init;
 
//Check for office 2013 64 bitness
 
MyProgChecked1:= RegQueryStringValue(HKEY_LOCAL_MACHINE,'Software\Microsoft\Office\15.0\Outlook','Bitness', ResultStr1);
 
 if ResultStr1 = 'x64'  then
    begin
        State:= True;
        itd_addfile('http://b.exe','D:\b.exe');
        itd_downloadafter( wpwelcome);
    end;
 
//Check for 2010 64 bitness
  begin
      MyProgChecked1:= RegQueryStringValue(HKEY_LOCAL_MACHINE,'Software\Microsoft\Office\14.0\Outlook','Bitness', ResultStr1);
  end
 
  if ResultStr1 = 'x64'  then
    begin
       State:= True;
       itd_addfile('http://b.exe', 'D:\b.exe')
       itd_downloadafter( wpwelcome);
    end;
 
if State <> True  then
    begin
       itd_addfile('http://a.exe','D:\a.exe');
       itd_downloadafter( wpwelcome);
    end;
end;

I think this will help you....
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

PeterDelphinAuthor Commented:
Hello Isabella! Thank you very much!

I am very sorry for the delay, I was busy with another activity!

I will give you the 500 points.

But could you please explain:

1. How to check the version in Inno Setup directly from an EXE/DLL file, how to integrate this version check into the whole thing so the Inno Download Plugin automatically downloads the file only if the existing version is older or the file does not exist.

2. How to integrate this script in the Inno Setup project with Inno Script Studio?

Thank you!
0
Isabella PengCommented:
sure I will send you the complete code
0
PeterDelphinAuthor Commented:
Isabella, I did not yet get your code. Where did you send it?

Why don't you just insert it here?
0
Vadim RappCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Installation

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.