&tag(InnoSetup/dotnetframework);
// dotnet_Passive enabled shows the .NET/VC2010 installation progress
#define dotnet_Passive
#define use_dotnetfx40
[Languages]
Name: "en"; MessagesFile: "compiler:Default.isl"
[Run]
#include "scripts\products.iss"
#include "scripts\products\winversion.iss"
#include "scripts\products\fileversion.iss"
#ifdef use_dotnetfx40
#include "scripts\products\dotnetfx40client.iss"
#include "scripts\products\dotnetfx40full.iss"
#endif
[CustomMessages]
win2000sp3_title=Windows 2000 Service Pack 3
winxpsp2_title=Windows XP Service Pack 2
winxpsp3_title=Windows XP Service Pack 3
[Code]
function InitializeSetup(): Boolean;
begin
//init windows version
initwinversion();
if not minwinspversion(5, 1, 3) then begin
MsgBox(FmtMessage(CustomMessage('depinstall_missing'),
[CustomMessage('winxpsp3_title')]), mbError, MB_OK);
exit;
end;
// If no .NET 4.0 framework found, download and install
#ifdef use_dotnetfx40
if not dotnetfx40client(true) then
if not dotnetfx40full(true) then
dotnetfx40client(false);
#endif
Result := true;
end;