A P P E N D I X B | Appendixes | Microsoft Office Resource Kit |
Setup CommandLine Options and File Formats |
In This Appendix
Setup File Formats
Setup CommandLine 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, commandline 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 files that contain applicationspecific 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.
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.
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:
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 treestructured 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:
You can use the /g commandline 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 commandline option, see "Setup Command-Line Options" in the next section.
File name | Description | |
Setup.exe | Primary 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 | |
*.dll | Dynamic-link library (DLL) files containing custom procedures | |
Setup.lst, Setup.ini | Additional information files for Setup | |
|
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
– or –
In Windows NT Workstation version 3.51, click Run on the Program Manager File menu.
If you want to add a commandline option, type it after the command. For example, to run Setup in administrative mode, type a:\setup /a
Some commandline options are standalone parameters, while others take an argument, such as a number or file name. Options are not casesensitive; 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"
CommandLine Option Descriptions
The following table shows the commandline options recognized by the Office Setup program.
Note If you enter any invalid parameter, Setup displays a partial list of valid commandline options.
Following are special considerations when combining options on the same command line:
ERRORLEVEL Values
Under Windows 95, Setup returns one of the following values as the MSDOS ERRORLEVEL value used to control batch file processing.
Commandline 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 20character Product ID from the OEM Certificate of Authorization by entering the number you specify. | |
/f | Specifies that all files be created with an 8character file name with a 3character 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 11digit 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. | |
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 | |
|
This section describes the process that Setup follows during an installation. Setup performs the following steps in a client installation:
For information about how Setup determines this, see "Determining Maintenance Mode Installation" later in this appendix.
If Setup is running from a CD, a hard disk, or a network server, it does not create a temporary folder.
If the STF file has been modified, syntax errors may have been introduced.
The list of applications that Setup checks is in the Check Modules item in the Header section of the STF file.
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.
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.
|