Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a "Typical" and "Custom" installation option in Inno Setup?

I've seen a lot of software give users an option to install software with the typical settings, or to allow the users to choose what settings they prefer (like whether they want a desktop icon or not). How can I do this with Inno Setup?

like image 260
timetofly Avatar asked Dec 21 '10 17:12

timetofly


1 Answers

There's a sample of doing just this with the Inno Setup install. See the Inno Setup 5\Examples\Components.iss file that comes with Inno Setup itself.

The example shows creating "Full", "Compact", and "Custom" installation options in a single 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"
like image 123
Ken White Avatar answered Oct 02 '22 12:10

Ken White