從命令行執行可執行的安裝程式

從本機機器上的命令行使用參數執行 .exe 安裝程式,便可以執行多項安裝工作。要將部分安裝程序自動化時,這可能會很有用。

安裝或升級軟體

自訂選項後面的所有選項都會傳送至 Msiexec。

  • 語法:

    {installer path} /d|directory {product directory} /L|language /g|log {log path} /s|silent /v|custom {options}

  • 參數

    • {installer path} - 可執行的安裝程式路徑。
    • /d/directory {product directory} (選擇性) - 指定將放置產品的目錄。
    • /L/language {language code} (選擇性) - 指定使用者介面中使用的語言。請參閱下方的「語言代碼」區段取得支援的語言清單。
    • /g 或 /log {log path} (選擇性) - 指定應建立日誌 (詳述安裝程式所採取的動作),並將其寫入指定的檔案路徑。
    • /s/silent (選擇性) - 指定是否顯示使用者介面。
    • /v/custom {options} (選擇性) - 指定要傳送至 Msiexec 處理作業的選項。請參閱執行 MSI 安裝程式瞭解詳細資訊。
  • 範例

    oracle_content_setup.exe /directory "C:\Oracle\Oracle Documents" 

修復軟體

修復期間所使用的語言,將成為安裝產品時使用的語言。自訂選項後面的所有選項都會傳送至 Msiexec。

  • 語法

    {installer path} /r|repair /g|log {log path} /s|silent /v|custom {options}

  • 參數

    • {installer path} - 安裝程式 MSI 檔案的路徑。
    • /r/repair - 修復產品。
    • /g/log {log path} (選擇性) - 指定應建立日誌 (詳述安裝程式所採取的動作),並將其寫入指定的檔案路徑。
    • /s/silent (選擇性) - 指定是否顯示使用者介面。
    • /v/custom {options} (選擇性) - 指定要傳送至 Msiexec 處理作業的選項。請參閱執行 MSI 安裝程式瞭解詳細資訊。
  • 範例

    oracle_content_setup.exe /repair /log "C:\logs\oracle documents.txt"

擷取 MSI 和 MST 安裝程式

  • 語法

    {installer path} /e|extract {destination directory} /L|language {language code} 

  • 參數

    • {installer path} - 安裝程式 MSI 檔案的路徑。
    • /e/extract {destination directory} - 將 MSI 和 MST 安裝程式擷取至指定的目錄中。
    • /L/language {language code} (選擇性) - 指定擷取 MST 中所包含的字串語言。請參閱下方的「語言代碼」區段取得支援的語言清單。
  • 範例

    oracle_content_setup.exe /extract C:\Users\blair\desktop

在不顯示使用者介面的情況下使用安裝程式

  • 語法

    {installer path} /s|silent

  • 參數

    • {installer path} - 可執行的安裝程式路徑。
    • /s/silent (選擇性) - 指定是否顯示使用者介面。
  • 範例

    oracle_content_setup.exe /silent

語言代碼

  • 1025:阿拉伯文
  • 1029:捷克文
  • 1030:丹麥文
  • 1031:德文
  • 1032:希臘文
  • 1033:英文
  • 1034:西班牙文
  • 1035:芬蘭文
  • 1036:法文 (法國)
  • 3084:法文 (加拿大)
  • 1037:希伯來文
  • 1038:匈牙利文
  • 1040:義大利文
  • 1041:日文
  • 1042:韓文
  • 1043:荷蘭文
  • 1044:挪威文
  • 1045:波蘭文
  • 1046:葡萄牙文 (巴西)
  • 2070:葡萄牙文 (葡萄牙)
  • 1048:羅馬尼亞文
  • 1049:俄文
  • 1051:斯洛伐克文
  • 1053:瑞典文
  • 1054:泰文
  • 1055:土耳其文
  • 2052:中文 (中國)
  • 1028:中文 (台灣)