gpt4 book ai didi

inno-setup - 在 Inno Setup 中取消选择在 "Portable mode"中创建开始菜单和桌面图标

转载 作者:行者123 更新时间:2023-12-04 10:24:10 26 4
gpt4 key购买 nike

我在 [Tasks] 下有以下内容

[Tasks]
Name: "desktopicon"; Description: "Create a Desktop shortcut";
Name: "startmenu"; Description: "Create a Start Menu entry";
Name: "portablemode"; Description: "Portable Mode"; Flags: unchecked

及以下 [Setup]
Uninstallable=not WizardIsTaskSelected('portablemode')

我想要 desktopiconstartmenu当用户选择 portablemode 时要取消选择的任务, 因为这些选项在 portablemode 下是无用的安装配置:

enter image description here

如果有更清洁的方法可以做到这一点,我也对此感兴趣。

最佳答案

有两个怎么样 setup types – “完全安装”和“便携模式”?并且只允许“完全安装”类型的图标任务?

对于 Uninstallable , 使用 WizardIsComponentSelected .

[Setup]
Uninstallable=WizardIsComponentSelected('full')

[Types]
Name: "full"; Description: "Full installation"
Name: "portable"; Description: "Portable mode"

[Components]
Name: "full"; Description: "full"; Types: full

[Tasks]
Name: "desktopicon"; Description: "Create a Desktop shortcut"; Components: full
Name: "startmenu"; Description: "Create a Start Menu entry"; Components: full

enter image description here

关于inno-setup - 在 Inno Setup 中取消选择在 "Portable mode"中创建开始菜单和桌面图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60701215/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com