简体   繁体   English

使用Instal Shield如何通过自定义对话框复选框安装应用程序(文件传输,先决条件)

[英]Using Instal Shield how can one install an applcaition(file transfer,prerequiste) through custom dialog checkbox

我正在尝试通过创建自定义对话框来安装三个应用程序。在自定义对话框中有复选框和Onclicking复选框,此后接下来我想让我的应用程序进行文件传输,安装基于该复选框的先决条件。我希望这种情况发生所有这三个应用程序。请建议如何做以及如何给条件。

Assuming you're talking about a custom dialog for a Basic MSI, I would suggest the following: 假设您在谈论基本MSI的自定义对话框,我建议以下内容:

  1. Ensure each application in question is part of a separate feature. 确保每个有问题的应用程序都是单独功能的一部分。 If you go with the original dialog set, this would potentially let the user select them by feature name, or you could hide them. 如果使用原始对话框集,则可能会使用户按功能名称选择它们,或者可以隐藏它们。 These features should have meaningful names, along the lines of App1 , App2 , App3 . 这些功能应沿App1App2App3具有有意义的名称。
  2. Ensure your three check boxes are associated with different properties, such as INSTALL_APP_1 , INSTALL_APP_2 , INSTALL_APP_3 . 确保您的三个复选框与不同的属性关联,例如INSTALL_APP_1INSTALL_APP_2INSTALL_APP_3 I show public properties here out of habit, but since they will be used in the same sequence (on the same dialog box, even), it's okay to use private properties. 我出于习惯习惯在这里显示了公共属性,但是由于它们将以相同的顺序使用(甚至在同一对话框中),因此可以使用私有属性。 And use suffixes more meaningful than 1, 2, 3. 并使用比1、2、3更有意义的后缀。
  3. Adding multiple control events to the Next or Install button on the dialog box you described. 将多个控件事件添加到您描述的对话框上的“下一步”或“安装”按钮上。 For each feature you want to control this way: 对于您要以这种方式控制的每个功能:
    • Add an AddLocal control event, with an argument of the feature name (eg App1), conditioned to execute when the check box is checked (ie with a condition like INSTALL_APP_1 添加具有功能名称(例如App1)的参数的AddLocal控件事件,该事件的条件是在选中复选框时执行(例如,条件如INSTALL_APP_1
    • Add a Remove control event, with an argument of the feature name (eg App1), conditioned to execute when the check box is not checked (ie with a condition like NOT INSTALL_APP_1 . 添加一个带有功能名称(例如App1)的参数的Remove控件事件,该事件的条件是在未选中复选框时(即,条件如NOT INSTALL_APP_1
  1. If you are going to show this dialog box during maintenance, you should also initialize the values of the check box properties ( INSTALL_APP_1 , etc.) so that merely going past this dialog box doesn't change their installation state. 如果要在维护期间显示此对话框,则还应该初始化复选框属性的值( INSTALL_APP_1等),以便仅通过该对话框不会更改其安装状态。 You can use feature-state condition syntax ( !App1 , etc.) to do so in SetProperty custom actions scheduled just before showing the maintenance dialog (eg set property INSTALL_APP_1 to the value 1 with condition !App1=3 ). 您可以使用功能状态条件中的语法!App1等)在预定的SetProperty自定义操作,这样做只是显示维护对话框(如设置属性之前INSTALL_APP_1的值1与条件!App1=3 )。

  2. If these features are shown in a feature selection control, be sure to update the properties accordingly. 如果这些功能显示在功能选择控件中,请确保相应地更新属性。 Do so on the Next button of that dialog using a combination of the feature state and feature action syntaxes. 使用功能状态和功能操作语法的组合,在该对话框的“下一步”按钮上执行此操作。 The property should be 1 if the feature is currently installed and not being removed, or is being installed; 如果该功能当前已安装但尚未删除或正在安装,则该属性应为1否则,该属性应为1 it should be set to empty ( {} ) otherwise. 否则应将其设置为空( {} )。

This is a lot of steps, but together they help ensure the features will act as a user expects. 这是很多步骤,但是它们共同帮助确保这些功能可以按照用户期望的方式运行。 If he does nothing to change their state, they should persist as previously set. 如果他不采取任何行动来改变他们的状态,他们应该坚持以前的设定。 If visible in both the feature selection control and via check boxes, they should act in sync. 如果在功能选择控件和通过复选框中均可见,则它们应同步运行。

As far as prerequisites, if you mean the InstallShield concept of prerequisites, this you can associate prerequisites with the features for those apps. 就必备软件而言,如果您是指必备的InstallShield概念,则可以将必备软件与这些应用程序的功能相关联 If you just mean other components inside your MSI, those work perfectly well with the features defined in step 1 as well. 如果您只是想在MSI中使用其他组件,那么这些组件也可以与步骤1中定义的功能完美配合。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 安装Shield Basic MSI。 输入的配置文件路径有效时如何显示错误对话框 - install shield basic msi . How to display an error dialog when the entered configuration file path is valid 我如何安装Shield项目 - how can i install shield project 如何从使用Install shield 2009创建的.exe文件中提取源代码 - How to extract the source code from .exe file which is created by using install shield 2009 使用在安装屏蔽中创建的安装程序添加msi文件 - Adding an msi file with the installer created in install shield 安装Shield 2009-快捷方式创建 - Install Shield 2009 - Shortcuts creation 如何防止同时运行两个Install Shield向导实例? - How to prevent running two instances of Install Shield wizard in the same time? 安装Shield LE erros -1014和-5044 - Install Shield LE erros -1014 and -5044 如何使用pip安装软件包并将名称保存到文件以便以后安装 - How to install package using pip and save name to file to install it later 如何使用odoo 10中的终端在项目中安装所有自定义模块 - how install all custom module in project using terminal in odoo 10 使用自定义渠道从本地tar文件安装conda安装时出错 - Getting error with conda install using custom channel to install from local tar file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM