响应文件命令

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

注: 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>
概要文件是安装位置。此概要文件命令用于创建软件包组或安装位置。如果指定的软件包组已存在,那么此命令无效。当前,在创建概要文件时,静默安装过程会创建以下两种安装上下文:一种针对 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>
该安装命令用于指定要安装的安装软件包。

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

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

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

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

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

例如,要安装产品 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>
例如,要安装产品 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 (in wizard mode)

<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 命令中使用 modify='true' 属性以表明您希望修改现有安装。缺省值为 false。 如果只希望安装附加语言包,请在功能部件标识列表中使用连字符“-”,表示不添加新的功能部件。

要点: 您必须为功能部件列表指定 modify='true' 和连字符 '-'。否则,安装命令会安装缺省的功能部件,而卸载命令会删除所有功能部件。

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>
该卸载命令用于指定要卸载的软件包。

概要文件标识必须与现有概要文件或概要文件命令中指定的概要文件匹配。 指定功能部件标识、产品标识或版本都是可选操作。您可以将概要文件标识指定为空或者以下三个选项中的一个、两个或全部:功能部件标识、产品标识或版本。

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

Import

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

<!—add more offerings below>
<…>

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

Rollback

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

<!—add more offerings below
<…>

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

InstallAll

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

UpdateAll

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

License

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

例如:

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

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

将 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 ,那么不会要重新引导系统。


反馈