Inno-Setup 询问一次安装两次
使用 InnoSetup 我想提示用户是否希望安装附加软件 - 将其视为插件。我的问题是我想要安装的附加软件包被分成两个 MSI 文件。我只想提示用户一次安装软件包,但让 [Run] 部分中的每个文件检查相同的值。我该怎么做呢?
[Code]
function InstallSomething:Boolean;
begin
if (MsgBox('Do you want to install something?', mbInformation, mb_YesNo) = idYes) then
Result:=True
else
Result:=False;
end;
[Run]
Filename: {sd}\Software\MyAppA.msi; Check: InstallSomething;
Filename: {sd}\Software\MyAppB.msi; Check: InstallSomething;
因此,用户应该只收到一次消息,但每个文件如果为 true 则应安装,如果为 false 则跳过。
Using InnoSetup I want to prompt a user if they wish to install an additional piece of software - think of it as a plug-in. My issue is that the additional software package I wish to install is broken up into two MSI files. I want to only prompt the user once to install the package but have each file in the [Run] section check the same value. How do I go about doing this?
[Code]
function InstallSomething:Boolean;
begin
if (MsgBox('Do you want to install something?', mbInformation, mb_YesNo) = idYes) then
Result:=True
else
Result:=False;
end;
[Run]
Filename: {sd}\Software\MyAppA.msi; Check: InstallSomething;
Filename: {sd}\Software\MyAppB.msi; Check: InstallSomething;
So the user should only get the message once but each file should install if true or skip if false.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不能将函数调用的结果存储在布尔变量中并在 [Run] 部分中使用该布尔值吗?
阅读以下文档后似乎这是可能的: http://www. jrsoftware.org/ishelp/index.php?topic=scriptcheck
Can you not store the result of your function call in a boolean variable and use that boolean value in your [Run] section?
It seems that this is possible after reading the following documentation: http://www.jrsoftware.org/ishelp/index.php?topic=scriptcheck