Master-x64.ina -

2023年12月4日 0 条评论 287 次阅读 0 人点赞

Master-x64.ina -

; --- Optional: Disable program group page if not needed --- ; DisableProgramGroupPage=yes

[Run] Filename: "{app}\MyApp.exe"; Description: "{cm:LaunchProgram,My Application}"; Flags: nowait postinstall skipifsilent

[Icons] Name: "{group}\My Application"; Filename: "{app}\MyApp.exe" Name: "{group}{cm:UninstallProgram,My Application}"; Filename: "{uninstallexe}" Name: "{autodesktop}\My Application"; Filename: "{app}\MyApp.exe"; Tasks: desktopicon Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\My Application"; Filename: "{app}\MyApp.exe"; Tasks: quicklaunchicon master-x64.ina

// --------------------------------------------------------------------- // Prerequisite check before installation begins // --------------------------------------------------------------------- function InitializeSetup: Boolean; begin Result := True;

; --- 64-bit specific settings --- ArchitecturesInstallIn64BitMode=x64compatible ArchitecturesAllowed=x64compatible PrivilegesRequired=admin PrivilegesRequiredOverridesAllowed=dialog SetupLogging=yes UninstallLogMode=append ; --- Optional: Disable program group page if

[Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 6.1; Check: not IsWin10

// Check for .NET Framework 4.8 if not IsDotNet48Installed then begin SuppressibleMsgBox('This application requires .NET Framework 4.8.' + #13#10 + 'Please install it from https://dotnet.microsoft.com/download/dotnet-framework/net48', mbError, MB_OK, MB_OK); Result := False; Exit; end; begin Result := True

// --------------------------------------------------------------------- // Check for .NET Framework 4.8 (example) // --------------------------------------------------------------------- function IsDotNet48Installed: Boolean; var Release: Cardinal; begin Result := False; if RegQueryDWordValue(HKLM, 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full', 'Release', Release) then begin Result := (Release >= 528040); // .NET 4.8 = 528040 end; end;

// Optional: Check for admin rights (already set above, but double-check) if not IsAdminLoggedOn then begin SuppressibleMsgBox('Administrator rights are required to install this application.', mbError, MB_OK, MB_OK); Result := False; Exit; end; end;

文章评论(0)

你必须 登录 才能发表评论