Inno setup Inno设置:如果未选中,则不显示选项

Inno setup Inno设置:如果未选中,则不显示选项,inno-setup,Inno Setup,在看了这个例子之后,我在我的代码中添加了另一个选项,但我尝试做的是,如果在components部分没有标记一个选项,我不希望它出现在第1页。添加“帮助”;或第1页。添加“自述\de” 目前没有简单的方法可以从任何自定义页面隐藏项目。因此,按所选组件在选项页上有条件地显示某些复选框项并非易事。所以,在深入研究一些老生常谈的方法之前,我想建议你另一种方法 从您正在创建的页面的标题来看,您似乎需要该部分。本节允许您创建附加任务复选框,并将其简单绑定到选定组件。检查此示例: [Setup] AppNam

在看了这个例子之后,我在我的代码中添加了另一个选项,但我尝试做的是,如果在components部分没有标记一个选项,我不希望它出现在第1页。添加“帮助”;或第1页。添加“自述\de”


目前没有简单的方法可以从任何自定义页面隐藏项目。因此,按所选组件在选项页上有条件地显示某些复选框项并非易事。所以,在深入研究一些老生常谈的方法之前,我想建议你另一种方法

从您正在创建的页面的标题来看,您似乎需要该部分。本节允许您创建附加任务复选框,并将其简单绑定到选定组件。检查此示例:

[Setup]
AppName=My Program
AppVersion=1.5
DefaultDirName={pf}\My Program

[Types]
Name: full; Description: Full installation
Name: compact; Description: Compact installation
Name: custom; Description: Custom installation; Flags: iscustom

[Components]
Name: main; Description: "Program Files"; Types: full compact custom; Flags: fixed
Name: backup; Description: "Backup DB"; Types: full
Name: restore; Description: "Restore DB"; Types: full

[Tasks]
; if "backup" component is selected, these two tasks appear
Name: backuptask1; Description: "Backup 1"; GroupDescription: "Backup Tasks:"; Components: backup
Name: backuptask2; Description: "Backup 2"; GroupDescription: "Backup Tasks:"; Components: backup
; if "restore" component is selected, these two tasks appear
Name: restoretask1; Description: "Restore 1"; GroupDescription: "Restore Tasks:"; Components: restore
Name: restoretask2; Description: "Restore 2"; GroupDescription: "Restore Tasks:"; Components: restore

这是我的想法,但是我需要在安装程序完成安装后恢复几个文件,我不知道如何使用任务来完成。谢谢
[Setup]
AppName=My Program
AppVersion=1.5
DefaultDirName={pf}\My Program

[Types]
Name: full; Description: Full installation
Name: compact; Description: Compact installation
Name: custom; Description: Custom installation; Flags: iscustom

[Components]
Name: main; Description: "Program Files"; Types: full compact custom; Flags: fixed
Name: backup; Description: "Backup DB"; Types: full
Name: restore; Description: "Restore DB"; Types: full

[Tasks]
; if "backup" component is selected, these two tasks appear
Name: backuptask1; Description: "Backup 1"; GroupDescription: "Backup Tasks:"; Components: backup
Name: backuptask2; Description: "Backup 2"; GroupDescription: "Backup Tasks:"; Components: backup
; if "restore" component is selected, these two tasks appear
Name: restoretask1; Description: "Restore 1"; GroupDescription: "Restore Tasks:"; Components: restore
Name: restoretask2; Description: "Restore 2"; GroupDescription: "Restore Tasks:"; Components: restore