您目前已離線,請等候您的網際網路重新連線

如何使用 Office XP 安裝程式的命令列參數

重要:本文是以 Microsoft 機器翻譯軟體翻譯而成,而非使用人工翻譯而成。Microsoft 同時提供使用者人工翻譯及機器翻譯兩個版本的文章,讓使用者可以依其使用語言使用知識庫中的所有文章。但是,機器翻譯的文章可能不盡完美。這些文章中也可能出現拼字、語意或文法上的錯誤,就像外國人在使用本國語言時可能發生的錯誤。Microsoft 不為內容的翻譯錯誤或客戶對該內容的使用所產生的任何錯誤或損害負責。Microsoft也同時將不斷地就機器翻譯軟體進行更新。

按一下這裡查看此文章的英文版本:283686
本文已封存。本文係以「現狀」提供且不會再更新。
本文章的有 Microsoft Office 2000] 版本請參閱 202946
結論
Office 安裝程式接受數目選擇性的命令列參數的可用來控制安裝程式的運作方式。本文列出參數,並說明每個開關的功能。
其他相關資訊
下列的命令列選項搭配安裝程式命令列。利用命令列選項系統管理員可以控制如何使用 Windows 安裝程式封裝 (MSI 檔) 和轉換 (MST 檔) 的程式安裝軟體應用程式。

如果您打算使用數個安裝程式內容,將它們鍵入方塊中安裝設定檔 (Setup.ini),以減少遇到命令列長度限制的可能性。

重要附註
  • 參數不區分大小寫 ,/A,例如 是/a 一樣。
  • 除了在特別提到您可以只使用這些參數,當您執行的 Microsoft Office XP 初始安裝時。
  • 如果安裝程式設定檔 (Setup.ini) 或轉型 (MST 檔) 中,您就會使用,也可以使用的安裝程式命令列選項,命令列選項通常會優先採用。
  • Windows 「 安裝程式封裝 (MSI 檔案) 應該在相同 Setup.exe 的資料夾。Microsoft Office 的情況下 Windows 安裝程式封裝必須是系統管理安裝點的根資料夾中。
  • 當您使用 [多個交換器以空白空格分隔它們。比方說使用下列的命令列使用特定的安裝程式檔案和寫入記錄檔的結果:
    安裝/i ProPlus.msi /l* c:\logfile.txt
  • 當 Setup.exe 結束時,會設定 %errorlevel%,如果遇到錯誤。如果使用者取消安裝程式,傳回 errorlevel 會是零 (0) 表示沒有發生任何錯誤。
下表列出了安裝程式參數:
 Switch              Description                  ------------------------------------------------------------------------------- /?                  Displays a dialog box pointing to the Office                      Resource Kit at http://www.microsoft.com/Office/ORK/.                                          NOTE: The link to the Office XP Office Resource Kit is                     now http://office.microsoft.com/en-us/FX011511511033.aspx  ------------------------------------------------------------------------------- /a <msifile>        Setup performs an administrative installation using                      the specified Microsoft Installer (.msi) file to                      create an administrative install point. The .msi file                     must be in the same folder as Setup.exe.                     NOTE: To create an administrative installation,                      you must use an Enterprise edition of Office.                      Example: /a ProPlus.msi ------------------------------------------------------------------------------- /autorun            Only used in the Autorun.inf file. This switch's                       purpose is to indicate that Setup is being run by                     Windows automatically after you insert the Office CD                       in the CD-ROM drive.                     CAUTION: Do not modify the Autorun.inf file. The                      information it contains is necessary for the correct                     operation of Setup. -------------------------------------------------------------------------------/f<options>          Setup repairs the Office installation. The .msi file    <package path>    specified must be .msi file used to install Office                      originally. The .msi file must be in the same folder                      as Setup.exe.                     The Detect and Repair command (Help menu) in Office                     programs performs the same function as using the                      following options, /focums.                     If you run Setup and click Reinstall, Setup performs                     the same function as using the following options,                      /fecum. Valid options are:                     a  Force all files to be reinstalled regardless of                         checksum or version.                     c  Reinstall a file if it is missing or damaged (the                         stored checksum does not match the computed                         checksum value).                     d  Reinstall a file if it is missing, or a different                         version is present.                     e  Reinstall a file if it is missing, or an equal or                         older version is present.                     m  Rewrite all required local machine registry values.                     o  Reinstall a file if it is missing, or an older                         version is present.                     p  Reinstall a file only if it is missing.                     s  Reinstall all shortcuts, overwriting any existing                         shortcuts.                     u  Rewrite all required user registry values.                     v  Run from the source package and re-cache the local                         package.                     Example: /focums ProPlus.msi				
------------------------------------------------------------------------------------------
 /i <msifile>        Setup installs programs by using the Windows                     Installer package (MSI file) specified. The MSI                      file must be in the same folder as Setup.exe. If                      the file is not in the same folder as Setup.exe,                     it should be moved there, or a path to the file                      must be included. When running Setup.exe, /i is                      the default behavior, using the msifile specified                     in Setup.ini.                     Examples: /i ProPlus.msi                               /i "subfolder1\ProPlus.msi" ------------------------------------------------------------------------------ /j<option>          Creates an icon representing an Office program or   <package path>    feature that is configured during Setup to install                      the first time you use it ("installed on first use").                     Valid options are:                     u  Current user logged on to Windows.                        m   All users using the computer.                                                               NOTE: If you specify the /j option in the Setup                      command line, the only additional command-line                     options you can use, in addition to the /t sub                      option, are /q, /l, and /settings. All other                      command-line options are ignored.                     NOTE: In the case of Microsoft Office, use the /j                     option only when running Setup from an                     administrative installation point.                     Example: /ju c:\ProPlus.msi                     Example: /ju c:\ProPlus.msi /t install.mst------------------------------------------------------------------------------- /l<option>          Logs switches for Msiexec.exe (the Windows Installer)   <logfile>         and specifies the path to the log file. The flags                      indicate which information to log. Valid options are:                     a  Startup of actions                                 c  Initial UI parameters                     e  All error messages                     i  Status messages                     m  Out of memory                      o  Disk space errors				
                     r  Action-specific records                     p  Terminal properties                     u  User requests                     v  Verbose output                     w  Nonfatal warnings                     +  Append to existing file                     *  Log all information except verbose output. You can                         use the v switch along with the asterisk, /l*v.                     !  Writes each line to the log file. The default                         behavior is to cache 20 lines of log file text                         into memory and then write 20 lines to the log                         file at once. This is done to improve performance.                     NOTE: For more information, refer to the Knowledge                     Base article Q297107: You receive the "Installer                     terminated prematurely" error message when you use                     the ! logging option to install Office XP.                                            Example: /l* c:\logfile.txt                     This example creates the following verbose log                      files, using all logging mode options:                     Setup.exe log file:   c:\logfile.txt	                     OSP log file:         c:\logfile_Task(0001).txt                     Office log file:      c:\logfile_Task(0002).txt-------------------------------------------------------------------------------/m <.mif file>      Specifies an SMS .mif file name of 8 characters or less.                                        NOTE: Do not include the .mif extension with the                     filename; otherwise, the command line will return the                     following error: "Invalid command line".
 ------------------------------------------------------------------------------ /noreboot        Setup.exe will not restart the computer or display                     the restart dialog box at the end of an installation.                     It also passes REBOOT=ReallySuppress to every MSI                    in the list of chained installs, except for the                     last entry in the chain. Conversely, if you                    pass REBOOT=ReallySuppress as a property, it sets                    /noreboot and passes REBOOT=ReallySuppress to each                    MSI listed in the list of chained installs, except                    for the last entry in the chain.                   NOTE: Office XP Japanese Edition includes IME.                    IME needs to restart the computer. To avoid to display                    the restart dialog box at the end of an installation,                    you have to use REBOOT=ReallySuppress with *.MSI file to                    install. ------------------------------------------------------------------------------ /nosp              Override system pack detection logic and don't                    call the System Files Update (OSP.msi). It is                     possible for an install process to fail                    if the OSP.msi is not installed when needed.                     Caution should be used when including this option. ------------------------------------------------------------------------------				
 <PROPERTY>=<value>  Specifies a value for any of the Installer properties                      (see the Office Resource Kit for a complete list                      of valid properties). If the property value contains                      spaces, enclose the string in quotation marks                      ("<value>"). You can specify more than one property                      and value pair on the command line separated by                      spaces.                     Only public properties are set on the Setup                      command line. Public properties are all upper-                     case; you do not have to type the property                      names in upper-case on the command line. Private                     properties--properties consisting of mixed-case                     letters--are not recognized by Setup on the                      command line. You can set private properties in                      the Modify Setup Properties page of the wizard.                     Example: TRANSFORMS="c:\acct dept"                               DISABLEROLLBACK=1                              USERNAME="Mikey" ------------------------------------------------------------------------------ /q<option>          Selects the user-interface level. Valid options are                     n  None - No user interface is displayed.                     b  Basic - Only simple progress indicators and errors                         are displayed.                     r  Reduced - No user information is collected, and                         no progress indicators are displayed.                                    f  Full - All indicators with a modal dialog box at                         the end of Setup.                     +  Adds a completion message to the /n or /b                         option. The message is displayed only if Setup                        does not need to restart after the installation                        is complete.                                          -  Added after the b, f, n, or r option to                         suppress all modal dialogs.                     NOTE: You can only use this switch with an                      Enterprise edition of Office.                      Example: /qb- ------------------------------------------------------------------------------ /settings file      Specifies a Setup settings file for customizing                     Setup actions. If the file is not located in the                     same folder as Setup.exe, include the path;                      however, it is recommended the file be in the same                      directory as Setup.exe. Specifying a                      settings file forces Setup to use the referenced                     file in place of Setup.ini.                     Example:                     /settings MyApp.ini ------------------------------------------------------------------------------  /SPForce            Install the System Files Update (OSP.msi) even                      if the auto-detection process determines it is                      not required. Not supported on Windows 2000 and                     Windows Millennium, where the OSP.msi cannot be                     installed. ------------------------------------------------------------------------------  /SPOnly             Install only the System Files Update (OSP.msi).                     Do not install Office. This option only applies                     to installations of Microsoft Office on Windows                     98 or Windows NT 4. This switch is useful for                     pre-deployment of the System Files Update in                     preparation for Office deployment. ------------------------------------------------------------------------------   /t <transform>     Specifies the name of the transform (.mst) file. The                      /i switch is required with the /t switch. When using                      the /j switch with a transforms file, the /t switch                      must be used; otherwise the TRANSFORMS property should                      be used.                     Example: /t acct.mst /i off9.msi ------------------------------------------------------------------------------ /wait               Wait for the installation to complete before quitting                      the Setup program. ------------------------------------------------------------------------------ /webinstall url     Set the URL path to install the program from. The                     URL provided is considered the root of an Office                     administrative installation point. If Setup.exe                      determines it was started from Internet Explorer,                      Setup.exe queries the system to determine what HTTP                     path it was started from, and this switch is not                      required.                      NOTE: To create an administrative installation,                      you must use an Enterprise edition of Office.                       IMPORTANT: Installing other applications from an                     HTTP, HTTPS, or FTP source location is not supported.                     NOTE: Transforms are not supported from a URL                      source and must reside either on a network file                      share or as a stream in the msifile. ------------------------------------------------------------------------------ /x <msifile>        Setup uninstalls Office. The .msi file specified                      must be the same .msi file used to install Office                      originally. The .msi file must be in the same folder                      as Setup.exe.                     Example: /x ProPlus.msi ------------------------------------------------------------------------------				
如果您使用路徑中的內嵌空格的長檔名,請參閱下列文件 「 Microsoft 知識庫 」 中:
139427使用 [執行] 指令使用長檔名
参考
如需有關 Windows 「 安裝程式搭配使用的命令列參數的詳細資訊,請參閱 Msi.chm 檔。您可以藉由下載 Windows Installer SDK 範例、 工具和文件從下列 Microsoft 網站取得 Msi.chm 檔案:
inf OFFXP OFF02 參數的命令列參數

警告:本文為自動翻譯

內容

文章識別碼:283686 - 最後檢閱時間:12/05/2015 23:36:51 - 修訂: 3.6

Microsoft Office XP Professional Edition, Microsoft Office XP Small Business Edition, Microsoft Office XP Standard Edition, Microsoft Office XP Students and Teachers, Microsoft Office XP Developer Edition, Microsoft Access 2002 Standard Edition, Microsoft Excel 2002 Standard Edition, Microsoft FrontPage 2002 Standard Edition, Microsoft Outlook 2002 Standard Edition, Microsoft PowerPoint 2002 Standard Edition, Microsoft Word 2002 Standard Edition

  • kbnosurvey kbarchive kbmt kbproductlink kbstartprogram kbsetup kbcommandline kbhowto KB283686 KbMtzh
意見反應