1
votes

I want to check whether .net framework 4.5 available in end-user PC.If not it should download and install the .net framework 4.5 from this link http://www.microsoft.com/en-us/download/confirmation.aspx?id=30653 ,using innosetup with silent installer...

Actually i followed this link http://www.vincenzo.net/isxkb/index.php?title=.NET_-_Detect_framework ,but in this link it takes to web browser page and downloading is happening, i want to download and install the .net framework 4.5 within innosetup wizard itself,it should happen like silent installation.

How to achieve this task?

1

1 Answers

0
votes

Use Inno Setup ITDDownload plug-in for this purpose: Inno setup: Install file from Internet

The code for detecting .NET framework is fine but instead of executing browser:

ShellExec('open', 'http://download/.../dotnetfx.exe','','',SW_SHOWNORMAL,ewNoWait,ErrorCode);

download the file (.exe) into some directory and run it:

function ITD_DownloadFile(const url, filename: string): boolean;
function Exec(const Filename, Params, WorkingDir: String; const ShowCmd: Integer; const Wait: TExecWait; var ResultCode: Integer): Boolean;

Use procedures above - they require some initialization (you can finf it in ITD example (I am writing from my head)