This is implemented primarily using the [Components] segment, and a demo code is as follows:
[Setup]
Global settings, this paragraph must be
Appname=test
Appvername=test
Defaultdirname= "E:\TEST"
appversion=1.0
Compression=lzma2/max
Showlanguagedialog=yes
[Components]
Name:main; Description: "Main program (required)"; Types:full Compact Custom; Flags:fixed
Name:data; Description: "Data File"; Types:full
Name:help;description: "Help file"; Types:full
[Files]
Source: "F:\desktop\test\ipmsg.exe"; DestDir: "{app}"; Components:main
Source: "F:\desktop\test\bin.dat"; DestDir: "{app}"; Components:data
Source: "F:\desktop\test\help.chm"; DestDir: "{app}"; Components:help
Source: "F:\desktop\test\readme.txt"; DestDir: "{app}"; Flags:isreadme
Run the resulting installation package with the following effect:
Through the flag bit set to fixed, will ensure that the main program must be installed, in addition, the Chinese language package translation has a point of error, hehe, "clear" written "clear."
Inno Setup Primer (eight)--selective installation files