I want to download and install the .netframework 4.5 from web using innosetup. I followed these procedure, 1.I downloaded and installed InnoTools Downloader. 2.In InitializeWizard i declared
itd_init;
itd_addfile('http://go.microsoft.com/fwlink/?LinkId=225702',expandconstant('{tmp}\dotNetFx45_Full_x86_x64.exe'));
itd_downloadafter(10);
Where 10 is the curpageId. And in
NextButtonClick(CurPageID: Integer) i added ,
if CurPageId=104 then begin
`filecopy(expandconstant('{tmp}\dotNetFx45_Full_x86_x64.exe'),expandconstant('{app}\dotNetFx`45_Full_x86_x64.exe'),false);
end
*Now what i need to do is,i want to check whether .net framework 4.5 is installed in my pc or not, using the function how can i check *,
function Framework45IsNotInstalled(): Boolean;
var
bVer4x5: Boolean;
bSuccess: Boolean;
iInstalled: Cardinal;
strVersion: String;
iPos: Cardinal;
ErrorCode: Integer;
begin
Result := True;
bVer4x5 := False;
bSuccess := RegQueryDWordValue(HKLM, 'Software\Microsoft\NET Framework Setup\NDP\v4\Full', 'Install', iInstalled);
if (1 = iInstalled) AND (True = bSuccess) then
begin
bSuccess := RegQueryStringValue(HKLM, 'Software\Microsoft\NET Framework Setup\NDP\v4\Full', 'Version', strVersion);
if (True = bSuccess) then
Begin
iPos := Pos('4.5.', strVersion);
if (0 < iPos) then bVer4x5 := True;
End
end;
if (True = bVer4x5) then begin
Result := False;
end;
end;
where i need to check this condition, in my side downloading and installing of .netframework 4.5 is happening fine,the only condition i need to check whether .net framework 4.5 is installed or not,before calling this **itd_downloadafter(10)Where 10 is the curpageId.**. Then only download wont happen, if .netframework is already exist in my enduser pc. How can i achieve this task? any ideas?
search here
. – TLamaInitializeWizard
event method; if so, thenthis way
. – TLama