我们有以下要求需要在 Inno Setup 中完成。我们需要支持基于密码的文件安装以及通过互联网更新或 DVD 自动更新下一个版本
要求是:
以上场景用于从 DVD 映像运行安装程序。在 int 更新的情况下,客户安装的所有功能都应自动更新,无需用户提示密码。它应该默默地完成。
例子:
之前未安装我们软件的 PC。客户使用 SWVER001 DVD。使用 Feature1PWD 安装 => 基本软件 + 通用文件 + Feature1 文件将被安装
再次使用 SWVER001 DVD 安装。这次用户提供 Feature2PWD ==> Feature2 文件将被安装。基本 SW + Commonfiles + Feature1 文件将被保留并保持不变。Main Sw 将同时看到 Feature 1 和 Feature 2
用户使用 Internet 更新安装 SWVER002。在这里安装程序应该看到基本软件 + 通用文件 + Feature1 文件 + Feature2 文件。它应该一次更新所有 4 个,而无需用户输入。静默更新会很好
我正在考虑以下方法 1. 创建一个带有基本/通用安装文件的主安装程序 2. 然后为每个功能创建子安装程序 3. 然后主安装程序将根据密码调用子安装程序。4.主设置然后将存储在registry/ini文件中选择的先前功能
在 int 更新的情况下,从 registry/ini 中获取先前选择的功能,然后在没有任何用户输入的情况下自动进行静默安装
在 Inno Setup 中配置上述内容还有其他更好的建议吗?
为每个特征创建一个组件并根据输入的密码自动选择组件更容易。
就像是:
[Components]
Name: "FeatureA"; Description: "Feature A"
Name: "FeatureB"; Description: "Feature B"
Name: "FeatureC"; Description: "Feature C"
[Code]
function TestComponentPassword(
Password: string; Component: string; ComponentPassword: string): Boolean;
var
I: Integer;
begin
Result := (Password = ComponentPassword);
if Result then
begin
for I := 0 to WizardForm.ComponentsList.Items.Count - 1 do
begin
WizardForm.ComponentsList.Checked[I] :=
(WizardForm.ComponentsList.Items[I] = Component);
end;
end;
end;
function CheckPassword(Password: String): Boolean;
begin
Result :=
TestComponentPassword(Password, 'Feature A', 'aaa') or
TestComponentPassword(Password, 'Feature B', 'bbb') or
TestComponentPassword(Password, 'Feature C', 'ccc');
end;
在 Inno Setup 6 中,您可以使用WizardSelectComponents
而不是按名称查找组件。
对于更新,为每个组件/功能创建一个单独的安装程序。AppId
对所有安装程序使用相同的方法,以便他们共享卸载日志。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句