回應檔指令

您可以使用這個參照表來進一步瞭解回應檔指令。

註: 在提供的範例中,offering id 值是指套件 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 指令來指定要安裝的安裝套件。

設定檔 ID 必須符合現有的設定檔,或是由 set profile 指令所建立的設定檔。

您可以透過逗點區隔的清單,選擇性地指定特性 ID。例如:'feature1, feature2'。如果未指定任何特性 ID,則會安裝預設特性。

註: 即使未在逗點區隔的清單中明確指定,仍會安裝必要的特性。

selected 為選用屬性。依預設,selected 會設為 true。當 selected 設為 false 時,無聲自動安裝就不會安裝套件。在精靈模式中執行時,套件會顯示在選取套件頁面,但不會在起始時選取。

版本號碼不是必要的。如果未指定任何版本,Installation Manager 會安裝具有指定 ID 的最新產品。

例如,若要安裝 Product A 1.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 1.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>
請使用此指令來指定要更新的設定檔。設定檔 ID 必須符合現有的設定檔。
註: 此指令只能在精靈模式中用來呼叫更新精靈;在無聲自動模式中無法運作。

Modify(在精靈模式中)

<modify>
<offering profile= 'profile id'>
</modify>
請使用此指令來指定要修改的設定檔。設定檔 ID 必須符合現有的設定檔。
註: 此指令只能在精靈模式中用來呼叫更新精靈。此指令在無聲自動模式中無法運作。

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。當您只要安裝其他語言套件時,請在特性 ID 清單中使用連字號 "-",表示不新增任何特性。

重要: 您必須在特性清單中指定 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 指令來指定要解除安裝的套件。

設定檔 ID 必須符合現有的設定檔,或是 profile 指令中指定的設定檔。可以選擇是否要指定特性 ID、供應項目 ID 或版本。您可以指定設定檔 ID 而不指定下列任一選項,或指定下列三個選項的其中一個、兩個或全部:特性 ID、供應項目 ID 或版本。

例如,沒有指定任何特性 ID、供應項目 ID 或版本時,則會解除安裝指定設定檔 ID 中的所有特性、供應項目及版本。如果指定設定檔 ID 及版本,則會解除安裝符合該設定檔 ID 及版本的已安裝套件。解除安裝符合設定檔 ID 及版本的所有特性與供應項目。

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 時,系統不會重新啟動。


意見