How to install the "Typical" and "Custom" installation options in Inno Setup?

I have seen how many software give users the ability to install software with typical settings or allow users to choose which settings they prefer (for example, whether they want a desktop icon or not). How can I do this using Inno Setup?

+4
source share
2 answers

Here is an example of how to do this with the Inno Setup installation. See Inno Setup 5 \ Examples \ Components.iss file, which comes with Inno itself.

This example creates the Full, Compact, and Custom options in the same Setup.exe file.

; -- Components.iss -- ; Demonstrates a components-based installation. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES! [Setup] AppName=My Program AppVersion=1.5 DefaultDirName={pf}\My Program DefaultGroupName=My Program UninstallDisplayIcon={app}\MyProg.exe OutputDir=userdocs:Inno Setup Examples Output [Types] Name: "full"; Description: "Full installation" Name: "compact"; Description: "Compact installation" Name: "custom"; Description: "Custom installation"; Flags: iscustom [Components] Name: "program"; Description: "Program Files"; Types: full compact custom; Flags: fixed Name: "help"; Description: "Help File"; Types: full Name: "readme"; Description: "Readme File"; Types: full Name: "readme\en"; Description: "English"; Flags: exclusive Name: "readme\de"; Description: "German"; Flags: exclusive [Files] Source: "MyProg.exe"; DestDir: "{app}"; Components: program Source: "MyProg.chm"; DestDir: "{app}"; Components: help Source: "Readme.txt"; DestDir: "{app}"; Components: readme\en; Flags: isreadme Source: "Readme-German.txt"; DestName: "Liesmich.txt"; DestDir: "{app}"; Components: readme\de; Flags: isreadme [Icons] Name: "{group}\My Program"; Filename: "{app}\MyProg.exe" 
+6
source

I think you should use the [Code] section

The answer given by Ken White only works with files to include / exclude from the installation.

It does not disable the dir page or the page requesting the user if he wants or does not have a desktop icon. (eg)

See an example: CodeClasses.iss inside C:\Program Files\Inno Setup 5\Examples

+1
source

Source: https://habr.com/ru/post/1332937/


All Articles