function InitializeSetup(): Boolean;
var
ErrorCode: Integer;
NetFrameWorkInstalled : Boolean;
SimConnectInstalled : Boolean;
Result1 : Boolean;
sRet: string;
begin
NetFrameWorkInstalled := RegKeyExists(HKLM,'SOFTWARE\Microsoft\.NETFramework\policy\v2.0');
if NetFrameWorkInstalled =true then
begin
Result := true;
end
else
begin
Result1 := MsgBox('This setup requires the .NET 2.0 Framework. Please download and install the .NET Framework and run this setup again. Do you want to download the framework now?',
mbConfirmation, MB_YESNO) = idYes;
Result:=false;
if Result1 =true then
begin
ShellExec('open', 'http://www.microsoft.com/downloads/details.aspx?familyid=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&displaylang=en','','',SW_SHOWNORMAL,ewNoWait,ErrorCode);
end;
exit;
end;
SimConnectInstalled := RegValueExists(HKCR,'Installer\Assemblies\Global','Microsoft.FlightSimulator.SimConnect,publicKeyToken="31BF3856AD364E35",version="10.0.61242.0",processorArchitecture="x86",culture="neutral"');
if SimConnectInstalled =true then
begin
Result := true;
end
else
begin
MsgBox('This setup requires SP1 Simconnect . Please Install it',mbInformation, MB_OK);
Result:=false;
end;