Professional Documents
Culture Documents
Module 1 Lesson 2
Module 1 Lesson 2
2
Learning
Services
Contents
Information in this document is subject to change without notice. The names of companies,
products, people, characters, and/or data mentioned herein are fictitious and are in no way intended
to represent any real individual, company, product, or event, unless otherwise noted. Complying
with all applicable copyright laws is the responsibility of the user. No part of this document may
be reproduced or transmitted in any form or by any means, electronic or mechanical, for any
purpose, without the express written permission of Microsoft Corporation. If, however, your only
means of access is electronic, permission to print one copy is hereby granted.
Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual
property rights covering subject matter in this document. Except as expressly provided in any
written license agreement from Microsoft, the furnishing of this document does not give you any
license to these patents, trademarks, copyrights, or other intellectual property.
The names of actual companies and products mentioned herein may be the trademarks of their
respective owners.
Module 1.2 33
In s e rt
CD
RO M Yes A le r t U s e r a n d E n d
N o
D id
Is O S Is U s e r
I n s t a lle r
Yes E nd N T No an
R equest
3 .5 1 ? A d m in ?
C D ?
N o N o Yes
Has
Is
P r o je c t
W in d o w s Is O S C a ll I N S T M S I . E X E
B een N o No Yes
I n s t a lle r W in 9 .x ? fro m s o u rc e & E n d
I n s t a lle d
P re s e n t?
?
Yes Yes
R un
P r o je c t C a ll lo c a l I n s t a lle r
N o
F ro m and E nd
S o u rc e ?
Yes
E nd
Command-Line Switches are most useful when few customizations are needed
or when users want to create several different installations quickly. There is no
need to edit any Project files (such as the Setup settings file) or run any special
tools (such as the Office Custom Installation Wizard).
It is possible to create multiple custom installations by defining different
command lines for different users or by creating multiple batch files or
shortcuts. This method is especially useful if there is a need to create multiple
deployment packages by using a systems management tool — and each package
requires a different command line.
For example, if the Engineering and Accounting departments install the same
version of Project but use unique organization names, the Administrator may
create two shortcuts that have the following command lines:
setup.exe /q companyname="Engineering Department"
setup.exe /q companyname="Accounting Department"
SETUP.EXE does not actually process command line switches. Instead it reads them
from the command line and passes them to the Windows Installer to be processed.
There are exceptions to this rule however. The following three switches are
processed by SETUP.EXE.
For more information, see the following Knowledge Base article: Q202946 "Setup
Switches for Microsoft Office 2000 ".
install
Microsoft Project,
and you must have
write access to it.
Run Setup from
Microsoft Project
CD by using the /a
command-line
option. For example:
e:\setup.exe /a
data1.msi
When Setup prompts
you for the
installation location,
enter the network
share that you
created.
Setup copies all of
the files from
Microsoft Project
CD to the network
share.
Setup Properties are global variables used during the installation process. They
can be used to set the information normally entered by a user during
installation. For example, the setup property COMPANYNAME can be set to
automatically populate the organization name that appears in the Help/About
box. Numerous setup properties exist.
For a complete list of setup properties for Microsoft Project 2000, see the
Microsoft Project 2000 Resource Kit.
Using Switches & Properties in Combination Using Command
Multiple Command
Line Switches
Line Switches
and SetupSetup.ini
Properties
Files
Module 1.2 45
Some properties are public, meaning that they can be overridden at the
command line or set dynamically during the installation using standard actions
or custom actions. (Note: The names of public properties are always in all
uppercase letters.)
Some properties 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
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.
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 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.
; /settings <path to ini file> is passed on the command line, that file will
;[MSI]
; If a value is present, the MSI section gives the name of the MSI file to install.
; This file must be in the same directory as setup.exe, and both must be in the
root
; If no value is present, setup.exe will look for exactly one file matching "*.msi"
MSI=INSTALL.MSI
;[MST]
; If a value is present, the MST section gives the full path to a transform to
apply.
Module 1.2 47
; Remember to uncomment both the section name and the value names.
;MST1=\\server\share\some transform.mst
;MST1=D:\transforms\my transform.mst
;[Options]
; PropName=PropValue
; Remember to uncomment both the section name and the value names.
;USERNAME=Customer
;[Display]
; only appear if Setup does not need to reboot to complete the installation.
; Remember to uncomment both the section name and the value names.
;Display=None
;CompletionNotice=Yes
[Logging]
; There are three possible values, all are optional and have defaults as shown
below
When To Use The Setup Settings File
; logfile if it exists.
;Type=icewarmup
;Path=\\ProjSrv\logfiles\
;Template=Microsoft Project %UserName%(*).txt
Template=Microsoft Project 2000 Setup(*).txt
Type=voicewarmup
When a user double-clicks Setup.exe, Setup reads the customizations from the
SETUP.INI file automatically. A Setup settings file should be used when it is
not necessary or viable for users to enter a complicated command line when
they run Setup or when there is no need to create a batch file or shortcut.
The settings file is also useful when an administrator wants to set options that
are awkward to include in a command line. The settings file organizes Setup
options in an easy-to-read format that typically will be more helpful than
creating a long command line.
Administrators can create multiple settings files for different groups of users.
Users specify the settings file they want to use by using the /settings Setup
command-line option. It is also possible to specify Setup command-line options
along with a custom Setup settings file. If a command-line option is specified
that conflicts with a value in the settings file, Setup uses the command-line
option.
Using Switches, Properties, and *.ini Files The Windows Installer Package: INSTMSI(W).EXE
Module 1.2 49
For example, an administrator can create two settings files for the Engineering
and Accounting departments. Users in each department run Setup by using one
of the following command lines:
setup.exe /settings off9engr.ini
setup.exe /settings off9acct.ini
Suppose, however, that these two departments need to use a common set of
custom options, except that each needs a different organization name. Then it is
possible to customize the default settings file (Setup.ini) with the standard
options, and then the Engineering and Accounting departments use the
following command lines to run Setup:
setup.exe companyname="Engineering Department" /settings off9engr.ini
setup.exe companyname="Accounting Department" /settings off9acct.ini
Setup uses the options defined in the settings file and sets the organization name
according to the command line.
Windows Installer
During the course of its operation, SETUP.EXE looks for the installation of
Windows Installer (MSIEXEC.EXE). If it is already installed on the system,
SETUP.EXE calls upon MSIEXEC.EXE, passes on any switch, property and
.INI information, and the installation proceeds on to the second phase of the
installation process.
SETUP.EXE will use the Windows Installer currently on the system, regardless of
the application from which it was installed. For example, if Office 2000 is already on
the system, Project will simply use the Windows Installer placed on the system at
that time, rather than install Windows Installer again. The reason for this is that
Windows Installer is an operating system “service” that allows the operating system
to take over the installation process. Of the current operating systems, only
Windows 2000 ships with this service pre-installed. Therefore, it is necessary to
install the Windows Installer files on Windows 95/Windows 98 and Windows NT
4.0 before Microsoft Project 2000 installation can proceed.
If Windows Installer is not detected, SETUP.EXE installs it. On Windows 9x
platforms, this is done using the file INSTMSI.EXE. On Windows NT
platforms the file INSTMSIW.EXE is used.
Both INSTMSI.EXE & INSTMSIW.EXE files are IExpress packages that
decompress the complete list of Windows installer files to a new directory
within the temp directory. The name of this directory usually is of the form
IXP###.tmp, for example: IXP001.tmp.
Once the files are expanded, INTSMSI.EXE calls on the internal file
MSIINST.EXE to install the Windows Installer files. MSIINST then performs
the following steps:
Checks the platform and the version of the files to be installed. On
incompatible platforms, the message box below will appear.
decompressed files to run the install. If the operating system of the computer
is Microsoft® Windows NT® or Microsoft® Windows® 2000, the following
are true:
If the user is not an administrator on the machine and Project setup has been
run with the /jm switches:
MSIINST looks for an existing install of the installer with which to run.
This allows non-administrators to upgrade to newer versions of the installer
if the product code has been assigned to them. (Product codes can be
assigned in Windows 2000)
If a previous version of the installer cannot be found, or the user is an
administrator on the machine, MSIINST attempts to register the
decompressed files as the installer service. These files will be used to run
the install.
MSIINST then calls MSIEXEC.EXE against the included database(s). The
default database is named INSTALL.MSI for Microsoft Project 2000. It is
called with a basic logging /lv switch, which overrides any policy settings.
The log file is created in the temporary directory along with the other
decompressed files. You must retrieve the log file before completing the
installation or it will be deleted. You can override the default command line
to generate a full log elsewhere. The basic command line (currently) for a
normal install is:
msiexec /I instmsi.msi /lv instmsi.log /qb+
Or the suggested:
msiexec /I instmsi.msi /lv* c:\intmsi.log /qb+
Note
In the example above, the command line switches are passed directly to
MSIEXEC.EXE. The same functionality happens when including these
switches on the SETUP.EXE command line.
Note
INSTMSI and COPYMSI are only available on Windows 2000 during the betas
and for development purposes. The Windows installer comes pre-installed on
these computers, and will only be updated by service packs.
The Window Installer database (.MSI file) consists of many interrelated tables
that together comprise a relational database of the information necessary to
Transforms
Module 1.2 53
install a group of features. This database replaces the ACME Setup STF and
INF text files as the key components for installing applications. Because the
database is relational, changes made to one table are propagated automatically
throughout the database. This is a very efficient process for introducing
consistent changes into the installation process and means that users can more
easily customize a large application or group of applications. The database
tables reflect the general layout of the entire group of applications, including:
Available features
Components
Relationships between features and components
Necessary registry settings
User interface for the application
To create an installation database, program developers must populate the tables
with all the information about the applications and the installation process.
Even though these files are considered relational databases, it is not possible to
open or modify these databases with tools such as Microsoft Access or
Microsoft® SQL Server™. Manually authoring all these tables is a large task
even for a moderate size installation. Microsoft Technical Support does not
support the modification of the MSI package File.
For more information on the general scheme of the installer database, see the
Microsoft Project 2000 Resource Kit.
On all platforms, the MSI and MST files cached in the system folder are stored in a
file called Installer. These files must be present for any feature to be installed when
“Installed on First Use” is used. These files are also necessary during additional
component installs and maintenance mode setups. All files in the Installer folder are
Read-Only for Everyone on an NTFS partition.
N am e, O r g,
CD Key
Y es Ye s
Custom
Typical
N ext
Ye s
R em o ve P revio u s U pgrad e
V ersio n
F eatu re T ree
No
R ebo o t
C lean-u p &
R esu m e C o m plete S etu p
P ro cess
?
Highest Version Wins Versioned Files Win Favor Product Language
Module 1.2 55
This is new setup behavior that is introduced by Window Installer. The behavior is
motivated by the desire to guarantee the application being installed will function.
Mismatched Multiple Languages Non-versioned
Preserve Superset
FilesLanguages
Using Companion
Non-versioned Files Are User Data
All other things being equal, after factoring out any common languages
between the file being installed and the file on the machine, any remaining
languages are favored according to what is needed by the product being
installed.
Example:
Both files have the same version.
The file on the machine is a multi-language file (English, French, and
Spanish)
The file to be installed is a multi-language file (English, Italian, and
German).
The new file is installed since there are languages’ remaining after English is
factored out.
All other things being equal preserve the file that supports multiple languages
regardless of whether it is already on the machine or is being installed.
Example 1:
Both files have the same version.
The file on the machine is for English and French.
The file being installed is for English, French, and Spanish.
The new file is installed since it supports a superset of the languages that the
file on the machine supports.
Example 2:
Both files have the same version.
The file on the machine is for English, German and Italian.
The file being installed is for German.
The existing file is used since it supports a superset of the languages that the file
being installed supports.
All other things being equal, when the Modified date is later than the Create
date for the file on the machine, Window Installer does not install the file
because user customizations would be wiped out. When the Modified and
Create dates are the same, the file is installed. Windows Installer assumes that if
the created and modified dates are essentially the same that the file does not
contain any user data so it is safe to overwrite.
All other things being equal, a non-versioned file that is associated with a
versioned file using the companion mechanism abides by the rules for the
versioned file. The only exception is when the versioned file on the machine
and the versioned file being installed have the same version and language but
the companion file is missing on the machine. In this case, the companion file
being installed is used even though the versioned file on the machine is used.
Non-versioned files can inherit installation rules from a versioned file using the
“companion file mechanism”. Placing the primary key of a versioned file in the
Version field for a non-versioned file associates these two files as
“companions”. An example would be an application executable like
MYWARE.EXE and a corresponding settings file like MYWARE.SET. In
Rules Are Global
Module 1.2 57
general, the settings file should follow the same installation rules as the
application executable. So if the companion versioned file being installed gets
used, so should the non-versioned file being installed. The only exception is
when the versioned file being installed is identical to the versioned file on the
machine, but the non-versioned companion file is missing on the computer. In
this case the non-versioned companion file being installed is used even though
the versioned file being installed does not get used.
The rules for determining when to install a file reside in one place within the
installer and are global, meaning they apply to all files equally. For example, an
author of the installation of a product cannot specify to always overwrite a
particular file