title: How to install .net framework 4.5 after download completes from web using innosetup?
body: <p>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</p>
  
  <pre><code>itd_init;
  itd_addfile('http://go.microsoft.com/fwlink/?LinkId=225702',expandconstant('{tmp}\dotNetFx45_Full_x86_x64.exe'));
  itd_downloadafter(10);
  </code></pre>
  
  <p>Where 10 is the curpageId.
  And in </p>
  
  <pre><code>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
  </code></pre>
  
  <p>*<em>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 *</em>,</p>
  
  <pre><code>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 &lt; iPos) then bVer4x5 := True;
  
       End
    end;
  
   if (True = bVer4x5) then begin
      Result := False;
  end;
  end;
  </code></pre>
  
  <p><strong>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.**</strong>.
  Then only download wont happen, if .netframework is already exist in my enduser pc.
  How can i achieve this task? any ideas?</p>