Quantcast
Channel: VBForums - Application Deployment
Viewing all articles
Browse latest Browse all 254

Deploying app with Inno Setup

$
0
0
I don't know where to open this thread so i opened it here.

According to this thread Inno setup install framework 4.5.

I implemented net framework 4.0 to a installation file. Script will check if user has installed framework 4.0 if not it will install it automatically.

Code:

function FrameworkIsNotInstalled: Boolean;
begin
  Result := not RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\.NETFramework\policy\v4.0');
end;

procedure InstallFramework;
var
  StatusText: string;
  ResultCode: Integer;
begin
  StatusText := WizardForm.StatusLabel.Caption;
  WizardForm.StatusLabel.Caption := 'Installing .NET framework...';
  WizardForm.ProgressGauge.Style := npbstMarquee;
  try
    if not Exec(ExpandConstant('{tmp}\dotNetFx40_Full_x86_x64.exe'), '/q /noreboot', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
    begin
      // you can interact with the user that the installation failed
      MsgBox('.NET installation failed with code: ' + IntToStr(ResultCode) + '.',
        mbError, MB_OK);
    end;
  finally
    WizardForm.StatusLabel.Caption := StatusText;
    WizardForm.ProgressGauge.Style := npbstNormal;
  end;
end;

It works perfectly on all windows xp OS. But when you use it on Windows 7 it popup bunch of error's related to net framework. Reason ? I think the reason is that my setup install net framework 4.0 on win 7 instead of 4.5 ? What would be the solution for this . ?

To check if user use win 7
if user has installed net framework 4.5
Install

And to check if user use win xp
If user has installed net framework 4.0
Install

How can i check that

Viewing all articles
Browse latest Browse all 254

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>