A P P E N D I X    B Appendixes Microsoft Office Resource Kit

Setup Command­Line Options and File Formats Previous

Contents
Next

Index


In This Appendix
Setup File Formats
Setup Command­Line Options
Setup Process

This appendix describes the technical details of the Setup program for Microsoft Office 97 for Windows, including the format of the Setup files, command­line options, and general sequence of the Setup process.

   Note   The majority of this appendix assumes that you are running the Windows 95 or Windows NT version 4.0 operating system.

Setup File Formats

Setup files that contain application­specific information control the way Setup installs Office. This section describes the general format of two types of Setup files: the information file (INF) and the Setup table file (STF). These are the files that the Network Installation Wizard modifies. This information is provided to help you understand how Setup works and how you can use the Network Installation Wizard to modify the behavior of Setup.


    Caution   The behavior of Setup and the successful installation of Office depend on the internal integrity of the Setup files. These files are tab­delimited and rely on positional parameters. Do not modify them directly; instead, use the Network Installation Wizard to customize the Setup process. For more information about using the Network Installation Wizard, see Chapter 6, "Customizing Client Installations."


Setup relies on a set of files that work together to control the installation process for Office. The following table identifies the primary Setup files.

File nameDescription
Setup.exePrimary executable file for Setup
Off97Std.inf (Standard Edition)
Off97Pro.inf (Professional Edition)
Disk INF file; provides detailed information about the files to be installed
Off97Std.stf (Standard Edition)
Off97Pro.stf (Professional Edition)
STF file; specifies the logic of the installation process
*.dllDynamic-link library (DLL) files containing custom procedures
Setup.lst, Setup.ini Additional information files for Setup

The INF File

The disk INF file, Off97Std.inf (Standard Edition) or Off97Pro.inf (Professional Edition), is a text file that contains information about all the Setup files involved in an Office installation. This information includes the following:

  • Where a file is located and its default attributes

  • Whether a file is to be appended to an existing copy

  • Whether a file is to be backed up, renamed, or copied

  • Whether a file supports English or another language

The STF File

The STF file is the primary tool for configuring Setup to install Office. It specifies the installation process for each installation mode, and determines the nature, sequence, and extent of user input. It determines which options to install, where to install them, and how to respond to current configurations and user input.

The STF file consists of data in a tree­structured table. Setup takes different paths through the tree based on options that the user selects or based on the environment in which Setup is run. For example, Setup takes one path through the tree if it finds a previous version of Office installed, and a different path if it does not.

To eliminate duplicating portions of the table throughout the STF file, a portion of the table may be referenced by multiple paths in the tree. Because Setup carries out each line of the STF file only once no matter how many paths reference it, multiple references to a single line allow Setup to process the STF file more quickly.

The tree structure of the STF file affects the installation process. In particular, there are two effects to be aware of:

  • First, because Setup does not know which path it will take through the STF file until the installation begins, Setup cannot precisely predict the amount of disk space required. Setup may display disk space requirements that are slightly higher than the actual space needed.

  • Second, if you use the Network Installation Wizard to modify entries in the STF file, you may see duplicate Yes/No questions or Start menu items. This is because the Network Installation Wizard displays all the items in the tree even though some items may never be carried out by Setup during installation. For more information about the Network Installation Wizard, see Chapter 6, "Customizing Client Installations."

You can use the /g command­line option to generate a log file that keeps track of everything Setup does: what files it copies, where it copies them, what modifications it makes to INI files or the Windows registry, and any errors it encounters. For a description of this Setup command­line option, see "Setup Command-Line Options" in the next section.

Top

Setup Command­Line Options

You can run the Office Setup program from a command line. If you run Setup from a command line, you can add parameters to the command that allow you to specify certain options, such as choosing a Typical installation or creating a network installation log.

To run Setup from a command line

  1. In Windows 95 or Windows NT Workstation 4.0, click Start, and then click Run.

    – or –

    In Windows NT Workstation version 3.51, click Run on the Program Manager File menu.

  2. Type the location you are installing from followed by the word setup. For example, a:\setup or x:\msoffice\setup

    If you want to add a command­line option, type it after the command. For example, to run Setup in administrative mode, type a:\setup /a

Some command­line options are stand­alone parameters, while others take an argument, such as a number or file name. Options are not case­sensitive; that is, they can be in uppercase or lowercase. With a few exceptions, you can combine options in the same command line. For example, to run Setup from drive A so that it specifies the user name Laura Callahan, the organization Island Trading, and the log file C:\Tmp\Offlog.txt, you would type the following:

a:\setup /n "laura callahan" /o "island trading" /g "c:\tmp\offlog.txt"

Command­Line Option Descriptions

The following table shows the command­line options recognized by the Office Setup program.

Command­line option Description
/a Creates an administrative installation point. Valid only when running from CD or floppy disks.
/b number Bypasses the Microsoft Office 97 Setup dialog box by preselecting the type of installation:

    1 – Typical

    2 – Custom

    3 – Run from CD or Run from Network Server

/c "number" Bypasses the dialog box for entering and validating the 20­character Product ID from the OEM Certificate of Authorization by entering the number you specify.
/f Specifies that all files be created with an 8­character file name with a 3­character extension, instead of with a long file name.
/g{+} "file" Generates a log file that records details of the Setup process. If + is specified, Setup appends new information to the log file instead of overwriting it.
/gc{+} "file" Does the same as /g, except all calls and returns from custom actions are also logged, which can make the log file very large.
/k "number" Bypasses the dialog box for entering and validating the 11­digit key from the CD sticker by entering the number you specify.
/l "file" Overrides the default LST file (Setup.1st) with the specified file.
/l "file" Overrides the default LST file (Setup.lst) with the specified file.
/m number Specifies the Microsoft License Pak (MLP) licensing information needed to activate the MLP for floppy disks. Setup does not install any software, but terminates immediately after setting the count at the number you specify.
/n "" Prompts for a user name to use if no default user name exists in the Windows registry.
/n "name" Specifies the user name to use if no default user name exists in the Windows registry.
/o "" Prompts for an organization name to use if no default organization name exists in the Windows registry.
/o "organization" Specifies the organization name to use if no default organization exists in the Windows registry.
/q{option} Specifies the level of user interaction for batch mode installation:

    0 – Suppresses all dialog boxes except the final one. Using 0 is the same as using no argument.

    1 – Suppresses all dialog boxes, including the final one.

    t – Suppresses all Setup user interface elements.

/qn{option} Does the same as /q, except that the system is not rebooted and 0 is not a valid value. To suppress all dialog boxes except the final one, use /qn with no argument.
/r Reinstalls an application. Use in maintenance mode only.
/s "folder" Overrides the default source (the folder containing Setup.exe or the source specified in the maintenance mode STF file) with the specified folder.
/u{a} Removes Office. If a is specified, shared components are removed without prompting the user; otherwise the user is prompted before removing shared components. Use in maintenance mode only.
/x "file" Creates a network installation log file for tracking the number of installations made from an administrative installation point. This overrides the value, if any, specified in the STF file.
/y Proceeds normally, including setting registry entries, but does not copy any files to the user's disk. Use this option to restore registry values or to track down processing problems.

Note   If you enter any invalid parameter, Setup displays a partial list of valid command­line options.

Following are special considerations when combining options on the same command line:

  • The /a and /q options are mutually exclusive; using both results in a usage error message.

  • The /n option is ignored if /a is used.

  • The /u and /r options are mutually exclusive; using both results in a usage error message.

  • The prompt elicited by the /u option is suppressed if /q is used, and the shared components are not removed.

ERRORLEVEL Values

Under Windows 95, Setup returns one of the following values as the MS­DOS ERRORLEVEL value used to control batch file processing.

This ERRORLEVEL value Indicates this condition
0 Success
1 User quit
2 Parsing Command Line error
3 Default user or organization name error
4 External error
5 Internal error
6 Out of memory
7 Partly installed
8 Restart failed
9 Failed to run Acmesetup.exe

Top

Setup Process

This section describes the process that Setup follows during an installation. Setup performs the following steps in a client installation:

  1. Determine whether this is a new or a maintenance mode installation.

    For information about how Setup determines this, see "Determining Maintenance Mode Installation" later in this appendix.

  2. If Setup is running from Disk 1 of a floppy disk set, search from drive Z to drive A, and create the Mssetup temporary folder on the first hard disk that has sufficient disk space. If no hard disk is found, create the Mssetup folder in the user's Windows folder.

    If Setup is running from a CD, a hard disk, or a network server, it does not create a temporary folder.

  3. Check the STF file for syntax errors.

    If the STF file has been modified, syntax errors may have been introduced.

  4. Check for active applications that are potentially disruptive.

    The list of applications that Setup checks is in the Check Modules item in the Header section of the STF file.

  5. Run the STF file according to the branching logic defined in the file, and then perform the following steps:

    • Check for duplicate versions of the application being installed.

    • Prompt the user for input regarding corrections and custom configurations.

    • Determine whether there is adequate space on the hard disk.

  6. Copy the files into the system­specified and user­specified folders according to the instructions in the STF and INF files.

    The STF file determines which files or groups of files are copied and their destinations. The INF file specifies the characteristics of each file or group of files in the product, such as size and date. It also specifies instructions to be used when copying the files, such as whether to decompress the file or overwrite the destination file if it already exists.

  7. Delete or replace existing files as indicated.

  8. Make appropriate changes to the Windows registry and INI files.

  9. Remove the Mssetup folder, if one was created.

Determining Maintenance Mode Installation

Setup determines whether an installation is in maintenance mode by looking for an entry in the Windows registry to indicate that Setup has been run before. The entry is under the following key:

HKEY_LOCAL_MACHINE\Software\Microsoft\MS Setup (ACME)\Table Files

The Name value in the Table Files subkey is the product name and version, and the Data value is the path to the STF file. The following is an example of these value entries for Office 97.

Name          MS Office 97 Professional@v97.0.0.1114(1033)
Data            "C:\Program Files\Microsoft Office\Office\Setup\Off97Pro.STF"

If the Name value matches the product name and version of software Setup is attempting to install, Setup runs in maintenance mode using the STF file identified in the Data value.

If the Name value does not match the product name and version of software Setup is attempting to install, or if Setup cannot find or open the STF file identified in the Data value, Setup runs in install mode.


Top
Contents | << Previous | Next >> | Index