Project 2000. Windows Installer, страница 5

Someproperties are private, meaning that they cannot be overridden from the command line because they describe the local system or operating system. (Note: The names of private properties contain lowercase letters.)

To install Microsoft Project 2000 with the PROPERTY set to a certain VALUE, you must be careful of the syntax used at the command line. You can put the property anywhere except between an option and its argument.

For example, you must specify a file when you use the /i switch. In this case, the /i switch is the option and the specified file is the argument. Thus, when setting a property and using a switch, we must put the property before or after the option and its argument, not in between.

Correct syntax:

setup /i A:\Example.msi PROPERTY=VALUE

Incorrect syntax:

setup /i PROPERTY=VALUE A:\Example.msi


Using Switches & Properties in Combination

Command line switches and setup properties can be combined to customize installations. However some switches should not be used together and some properties cannot be used with some switches.

Using Multiple Command Line Switches

Command Line Switches can generally be divided into two types: verb switches and adverb switches.

Verb switches are switches that influence setup in a major way. For example, the /a  switch performs an administrative setup, while /x uninstalls Project. Verb switches should not be used together (except for patching an admin image which requires both the /p and /a). There are eight verb switches. They are /i, /x, /f[p|o|e|d|c|a|u|m|s|v], /j[u|m], /a, /p, /y and /z.

Adverb switches are modifier switches that affect a verb switch. There are four adverb switches. They are /t, /g, /l[a|e|c|i|m|p|r|u|v|w|+|!], /q[n|b|r|f].

/t and /g are for use with /j only.

/l and /q can be used with all verbs except /y and /z.

Using Command Line Switches and Setup Properties

While Setup Properties do not interact directly with Command Line Switches, the switches used can influence their efficacy. For example, all Setup Properties are ignored when used with a /j, /y, or /z switch. And some (like TRANSFORMS*) are also ignored with /x and /f. Thus caution must be exercised when using these five switches.


Setup.ini Files

Setup.ini files are also used to customize installations. Their main advantage is that they are easier to create than long command lines with multiple switches and setup properties.

Like command line switches, SETUP.EXE does not actually process the setup.ini file. Instead it reads the setup.ini file and creates a command line that is then passed on to the Windows Installer.

When a property or value is found in both the SETUP.INI file and on the command line, the command line overrides the .INI file settings.

SETUP.INI files consist of the following five sections:

n  [MSI] - specifies the path to the installation package for this installation. This is the same as the /i option on the command line.

n  [MST] - specifies the path to transforms used with this installation. This is the same as the /t option on the command line.

n  [OPTIONS] - section that displays where administrators can set and override properties in the MSI or MST files. Each option in the option section must have a property name and a value.

n  [DISPLAY] - is used to set the User Interface level used during setup. This corresponds to the /q option on the command line. Valid values are - none, basic, reduced, and full.

n  [LOGGING] - is used to set what logging switches are on by default and the path to where the logging file is created.

Below is an example of the contents of a SETUP.INI file for Microsoft Project 2000.

; Microsoft Project 2000 Windows installer setup.exe information file.

; If a file exists in the same directory as setup.exe named "setup.ini", or

; /settings <path to ini file> is passed on the command line, that file will

; be read and modify the default behavior of setup as shown below.