I have a system, on which I need to install an app from my InnoSetup
package. It includes the following check:
var
DownloadPage: TDownloadWizardPage;
IsDotNet: boolean;
procedure InitializeWizard;
begin
DownloadPage := CreateDownloadPage('Download of .NET framework is
requried', '.NET framework 4.8 is missing from your system and has to be
downloaded and installed.', @OnDlProgress);
end;
function NextButtonClick(CurPageID: Integer): Boolean;
begin
if ((IsDotNet = false) and (CurPageID = wpReady)) then
begin
DownloadPage.Clear;
DownloadPage.Add('
https://go.microsoft.com/fwlink/?linkid=2088631',
'ndp48-x86-x64-allos-enu.exe', '');
DownloadPage.Show;
try
try
DownloadPage.Download;
Result := True;
except
SuppressibleMsgBox(AddPeriod(GetExceptionMessage), mbCriticalError,
MB_OK, IDOK);
Result := False;
end;
finally
DownloadPage.Hide;
end;
end else
Result := True;
end;
function PrepareToInstall(var NeedsRestart: Boolean): String;
begin
IsDotNet := IsDotNetInstalled(net48, 0);
end;
During the setup, it says that .NET 4.8 is missing and offers to
download it. But if I try to reinstall .NET 4.8 it throws:
Details
.NET Framework 4.8 or a later update is already installed on this computer.
What am I doing wrong?