Article ID: 283686
Article Last Modified on 12/4/2007
APPLIES TO
- Microsoft Office XP Professional Edition
- Microsoft Office XP Small Business Edition
- Microsoft Office XP Standard Edition
- Microsoft Office XP Standard Edition for 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
This article was previously published under Q283686
For a Microsoft Office 2000 version of this article, see 202946.
SUMMARY
The Office Setup program accepts a number of optional command-line switches that you can use to control how the Setup program operates. This article lists the switches and describes the functionality of each switch.
MORE INFORMATION
The following command-line options are used with the Setup command line. By using command-line options, an administrator can control how programs that use the Windows Installer package (MSI files) and the transforms (MST files) install software applications.
If you plan to use several Setup properties, type them in the Setup settings file (Setup.ini) to reduce the possibility of encountering a command-line length limitation.
Important Notes
- Switches are not case sensitive, for example, /A is the same as /a.
- Except where specifically noted, you can only use these switches when you perform an initial installation of Microsoft Office XP.
- If you use a Setup command-line option that is also used in the Setup settings file (Setup.ini) or in the transform (MST file), the command-line option usually takes precedence.
- The Windows Installer package (MSI file) should be in the same folder as Setup.exe. In the case of Microsoft Office, the Windows Installer package must be in the root folder of the administrative installation point.
- When you use multiple switches, separate them with a blank space. For example, use the following command line to use a specific installer file and write the results to a log file:
Setup /i ProPlus.msi /l* c:\logfile.txt
- When Setup.exe ends, it sets %errorlevel% if an error was encountered. If the user cancels Setup, the errorlevel returned is zero (0), indicating no error occurred.
The following table lists the Setup switches:
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 ------------------------------------------------------------------------------
If you are using a long file name with embedded spaces in the path, see the following article in the Microsoft Knowledge Base:
139427 Using long filenames with the Run command
REFERENCES
For more information about command-line switches that are used with the Windows Installer, see the Msi.chm file. You can obtain the Msi.chm file by downloading the Windows Installer SDK samples, tools, and documentation from the following Microsoft Web site:
Additional query words: inf OFFXP OFF02 parameters command-line switches
Keywords: kbproductlink kbstartprogram kbsetup kbcommandline kbpubtypekc kbmsccsearch kbhowto KB283686