响应文件命令

您可以使用以下参考表来了解关于响应文件命令的更多信息。

注: offering id 值表示所提供示例中的软件包标识:id='offering id'
响应文件命令 描述

Profile

<profile
id='the profile (package group) id' 
installLocation='the install location of
 the profile'>
<data key='key1' Value='value1'/>
<data key='key2' Value='value2'/>

</profile>
概要文件即是安装位置。profile 命令用于创建软件包组或安装位置。如果指定的软件包组已存在,那么该命令将不起作用。目前,在创建概要文件时,静默安装会创建两种安装上下文:一种针对 Eclipse,另一种针对本机

您可以使用 <data> 元素来设置概要文件属性。

以下列表包含了当前受支持的键及相关值:
  • eclipseLocation 键指定现有的 Eclipse 位置值,如 c:\myeclipse\eclipse
  • cic.selector.nl 键指定“自然语言”(NL) 语言环境选择,如 zhjaen
注: 以逗号分隔多个 NL 值。
以下列表包含了当前受支持的语言代码:
  • 英语 (en)
  • 法语 (fr)
  • 意大利语 (it)
  • 简体中文 (zh)
  • 俄语 (ru)
  • 繁体中文(台湾)(zh_TW)
  • 繁体中文(中国香港特别行政区)(zh_HK)
  • 德语 (de)
  • 日语 (ja)
  • 波兰语 (pl)
  • 西班牙语 (es)
  • 捷克语 (cs)
  • 匈牙利语 (hu)
  • 韩语 (ko)
  • 葡萄牙语 (pt_BR)

Repositories

<server>
<repository location='http://example/
repository/'>
<repository location=”file:/C:/
repository/”>
<!—add more repositories below-->
<…>
      </server>
该命令用于指定在静默安装期间所使用的存储库。使用 URL 或 UNC 路径可指定远程存储库;使用目录路径可指定本地存储库。

Install

<install>
<offering profile= 'profile id' 
features= 'feature ids' 
id= 'offering id' Version= 'version' 
selected='true'></offering>

<!—add more offerings below>
<…>

</install>
install 命令用于指定要安装的安装软件包。

概要文件标识必须与现有概要文件或由设置概要文件命令创建的概要文件相匹配。

可以选择用逗号分隔的列表的形式指定功能部件标识。例如:“feature1, feature2”。如果未指定任何功能部件标识,那么会安装缺省的功能部件。

注: 即使未在逗号分隔的列表中显式指定必需功能部件,也会安装这些功能部件。

selected 属性是可选的。缺省情况下,selected 设置为 true。 如果 selected 设置为 false,那么静默安装不会安装该软件包。以向导方式运行时,该软件包会在软件包选择页面中显示,但最初并未被选中。

版本号不是必需的。如果未指定版本,那么 Installation Manager 会安装具有指定标识的最新产品。

例如,要安装 Product A V1.0:
<server>
  <repository location="http://productA/version10/repository/">
  </server>
<install>
<offering profile= 'IBM Software Development Platform' features= 'main_feature' id= 'com.ibm.productA'</offering>
</install>
例如,要安装 Product A V1.0.1:
<server>
  <repository location=”http://productA/version101/repository/">
</server>
<install>
<offering profile= 'IBM Software Development Platform' features= 'main_feature' id= 'com.ibm.productA'</offering>
</install>

Update(在向导方式中)

<update>
<offering profile= 'profile id'>
</update>
该命令用于指定要更新的概要文件。概要文件标识必须与现有概要文件相匹配。
注: 只能在向导方式中使用该命令来调用更新向导;它不能在静默方式中使用。

Modify(在向导方式中)

<modify>
<offering profile= 'profile id'>
</modify>
该命令用于指定要修改的概要文件。概要文件标识必须与现有概要文件相匹配。
注: 只能在向导方式中使用该命令来调用更新向导。该命令不能在静默方式中使用。

Modify <install modify='true'> 或 <uninstall modify='true'>(可选属性)

<uninstall modify='true'>
<offering profile='profile id'
 id='offering id' version='version' 
features='-'/>
</uninstall>

在 install 和 uninstall 命令中使用 <install modify='true'> 属性可指示您希望修改现有安装。缺省值为 false。 如果打算仅安装额外的语言包,请在功能部件标识列表中使用连字符“-”来指示将不添加任何新功能部件。

要点: 您必须为功能部件列表指定 modify='true' 和连字符 '-'。如果未指定,那么 install 命令会安装缺省的功能部件,而 uninstall 命令会除去所有功能部件。

Uninstall

<uninstall>
<offering profile= 'profile id' 
features= 'feature ids' 
id= 'offering id' version= 'version'>
</offering>

<!—add more offerings below>
<…>
</uninstall>

在不指定版本的情况下卸载软件包:

<uninstall>
<offering profile= 'profile id' 
id= 'offering id'></offering>
</uninstall>

卸载某个软件包组中的所有软件包:

<uninstall>
<offering profile= 'profile id'>
</offering>
</uninstall>
uninstall 命令用于指定要卸载的软件包。

概要文件标识必须与现有概要文件或 profile 命令中指定的概要文件相匹配。 可以选择指定功能部件标识、产品标识或版本。您可以仅指定概要文件标识,也可以在指定概要文件标识的同时还指定以下三个选项中的一个、两个或全部:功能部件标识、产品标识或版本。

例如,如果未指定功能部件标识、产品标识或版本,那么会卸载指定的概要文件标识中的所有功能部件、产品和版本。如果指定了概要文件标识和版本,那么会卸载与该概要文件标识和版本相匹配的已安装软件包。将会卸载与该概要文件标识和版本相匹配的所有功能部件和产品。

Import

<import>
<offering profile= 'profile id' 
features= 'feature id' 
id= 'offering id' version= 'version' 
selected='true'></offering>

<!—add more offerings below>
<…>

</import>
import 命令用于指定要导入的现有安装软件包。

Rollback

<rollback>
<offering profile= 'profile id'
 id= 'offering id' 
version= 'version'>
</offering>

<!—add more offerings below
<…>

</rollback>
rollback 命令用于从当前版本回滚至指定的版本。不能在 rollback 命令中指定功能部件。

InstallAll

<installALL/>
注: 该命令等同于使用
-silent -installAll 
.
该命令用于以静默方式搜索和安装所有可用软件包。

UpdateAll

<updateALL/>
注: 该命令等同于使用
-silent -updateAll 
.
该命令用于以静默方式搜索和更新所有可用软件包。

License

<license policyFile='policy file 
 location'  merge='true'/>

例如:

<license policyFile='c:\mylicense.opt' merge='true'/> 
license 命令用于生成包含 license 命令的响应文件。以记录方式启动 Installation Manager 后,您可以启动许可证向导。

在记录方式期间,如果通过许可证管理向导设置了 flex 选项,那么您设置的选项将记录在名为 license.opt 的许可证策略文件中。license.opt 文件与生成的响应文件位于同一个目录中,该响应文件包含引用该策略文件的 license 命令。

将 merge 属性设置为 true 或 false。缺省情况下,merge 属性设置为 true。如果设置为缺省值 true,那么所指定许可证策略中新的策略数据会与现有许可证策略合并。如果设置为 false,那么许可证策略文件中指定的策略将覆盖已存在的策略。

其他响应文件属性

响应文件属性 描述

clean

<agent-input clean='true'>
</agent-input>

缺省情况下,clean 属性设置为 false。Installation Manager 使用在响应文件中指定的存储库和其他首选项以及在 Installation Manager 中设置的现有首选项。如果某个首选项既在响应文件中进行指定又在 Installation Manager 中进行设置,那么在响应文件中指定的首选项优先。

如果 clean 属性设置为 true,那么 Installation Manager 会使用在响应文件中指定的存储库和其他首选项。Installation Manager 不会使用在 Installation Manager 中设置的现有首选项。

temporary

<agent-input clean='true' temporary='false'>
</agent-input>

如果 temporary 属性设置为 false,那么会持久保存在响应文件中设置的首选项。 缺省值为 false。

如果 temporary 属性设置为 true,那么不会持久保存在响应文件中设置的首选项。

您可以同时使用 temporary 和 clean 属性。例如,将 clean 设置为 true,而将 temporary 设置为 false。 运行静默安装后,响应文件中指定的存储库属性会覆盖先前设置的首选项。

License agreement acceptance

<agent-input acceptLicense='false'>
</agent-input>

在静默安装方式下使用 Installation Manager 时,缺省情况下是同意接受安装软件包携带的许可证。如果要安装的软件包具有必须接受的许可协议,那么静默安装操作将失败。要接受许可协议,必须将该属性设置为 <agent-input acceptLicense='true'>。通过这样做,您将同意接受响应文件中指定的每个软件包的许可协议。

Reboot later

<agent-input rebootLater='false'>
</agent-input>
如果 rebootLater 设置为 false 并且已安装的软件包需要重新引导 Windows 系统,那么执行完响应文件后,Installation Manager 会重新引导系统。 缺省值为 false。

如果 rebootLater 设置为 true ,那么不重新引导系统。


反馈