PeterDelphin
asked on
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:
How can I add this behavior in Inno Script Studio?
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?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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_L OCAL_MACHI NE,'Softwa re\Microso ft\Office\ 15.0\Outlo ok','Bitne ss', 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_L OCAL_MACHI NE,'Softwa re\Microso ft\Office\ 14.0\Outlo ok','Bitne ss', 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....
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_L
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_L
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....
ASKER
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!
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!
sure I will send you the complete code
ASKER
Isabella, I did not yet get your code. Where did you send it?
Why don't you just insert it here?
Why don't you just insert it here?
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
ASKER