What is an MSI property and what are their types?
Properties are global variables that installer uses during install or uninstall. It can be divided as:
Public Property:
Installer can use it internally as well as externally, which means it can be changed during run-time
also. The values of public properties can be set at the command line, and their values are preserved when execution switches from the User Interface sequence to the Execute sequence.
e.g.: INSTALL LEVEL
Private Property: Installer can use it internally only. Hence can't be changed during run-time. Private properties, on the other hand, cannot have their values set at the command line, and are reset to their default values when execution switches from the User Interface sequence to the Execute sequence.
e.g.: Product Code, Product Version, Manufacturer,
Version etc.
Another way to identify Private property is that it contain at least one lowercase letter.
Restricted Public Property:
Installer can't use it internally or externally for security purposes. e.g.: ALLUSERS, REMOVE, REBOOT, REINSTALL MODE etc.
Serial keys are generally stored as Restricted Properties to keep it secret.
Some of the commonly used properties with their respective (and generally used) values are given below:
ALLUSERS
|
1
|
The Installer will attempt a
per-machine installation
|
REBOOT
|
ReallySuppress
|
All applications must be packaged
without the requirement to reboot the application or the OS itself. This
property will prevent Windows installer service performing a reboot. For the
applications that require reboot, notification must be provided to the application
deployment team who will manage the reboot of the servers and workstations (generally in Maintenance Mode).
Note: Success, Failure, Soft or Hard Reboot message can be flagged with respective Return Codes in SCCM |
ROOTDRIVE
|
C:\
|
During install, msiexec identifies the drive with most amount of available space and it installs it there.
Setting ROOTDRIVE property value will enable you to specify any particular drive. |
ARPNOMODIFY
|
1
|
This setting disables the Change
button for the products in Add or Remove programs in the control panel
|
REBOOT PROPERTY: An administrator typically uses this property with a series of installations to install several products at the same time with only one restart or no restart at the end.
For example, the installer automatically prompts for a restart if it needs to replace any files in use during the installation.
REBOOT value
|
Description
|
Force
|
The UI always prompts the user with an option to restart at the end. If there is no user interface, and this is not a multiple-package installation, the system automatically restarts at the end of the installation.
|
Suppress
|
Suppress prompts for a restart at the end of the installation. The installer still prompts the user with an option to restart during the installation whenever it encounters the ForceReboot action. If there is no user interface, the system automatically restarts at each ForceReboot.
|
ReallySuppress
|
Suppresses all restarts and restart prompts initiated by ForceReboot during the installation. Both the restart prompt and the restart itself are suppressed.
|
Variable
|
Windows Installer Property
|
Path
|
Function
|
USERPROFILE
|
C:\Users\%USERNAME%
|
Local path to the user profile.
|
|
APPDATA
|
AppDataFolder
|
%USERPROFILE%\AppData\ Roaming
|
Configuration data of applications which roam with users
|
LOCALAPPDATA
|
LocalAppDataFolder
|
%USERPROFILE%\AppData\Local
|
Configuration data and temporary
data for applications that must not roam.
|
TEMP
|
TempFolder
|
%USERPROFILE%\AppData\Local\Temp
|
Temporary files and folders for
the user
|
ALLUSERSPROFILE
|
CommonAppDataFolder
|
C:\ProgramData
|
Local application data that are
used by all users.
For example the Start menu icons
are placed within this folder.
|
DOCUMENTS FOLDER
|
PersonalFolder
|
%USERPROFILE%\Documents
|
Users' personal documents folder.
|
PUBLIC FOLDER
|
Public
|
C:\Users\Public
|
Public folder in users directory
|
The INSTALLLEVEL property is the initial level at which features
are selected "ON" for installation by default. A feature is installed
only if the value in the Level field of the Feature table is less than or
equal to the current INSTALLLEVEL value.
The LaunchCondition table is used by the LaunchConditions
action. It contains a list of conditions that all must be satisfied
for the installation to begin.
The LaunchCondition table has the following columns.
Condition
Expression that must evaluate to True for installation to begin.
Expression that must evaluate to True for installation to begin.
Description
Localizable text to display when the condition fails and the installation must be terminated.
Localizable text to display when the condition fails and the installation must be terminated.
Remarks
You cannot guarantee the order in which the launch conditions are evaluated by authoring this table. If it is necessary to control the order in which conditions are evaluated, you should do this by using Custom Action.
You cannot guarantee the order in which the launch conditions are evaluated by authoring this table. If it is necessary to control the order in which conditions are evaluated, you should do this by using Custom Action.
REINSTALL: Comma-delimited list of features to be reinstalled.
REINSTALLMODE: A string of letters showing the actions to be performed during reinstall. The default is “omus”, where
o: fixes file which has older version or is missing
m: fixes all machine based files during reinstall, generally HKLM and HKCR entries
o: fixes file which has older version or is missing
m: fixes all machine based files during reinstall, generally HKLM and HKCR entries
u: fixes all user based files during reinstall, generally HKU entries
s: reinstall all shortcuts with their respective icons
The REINSTALLMODE property
is a string that contains letters specifying the type of reinstall to perform.
Options are case-insensitive and order-independent. This property should
normally always be used in conjunction with the REINSTALL property.
However, this property can also be used during installation, not just
reinstall.
Note The Windows
Installer ignores the REINSTALLMODE property
during an administrative installation.
By default the REINSTALLMODE is "omus".
Code
|
Option
|
p
|
Reinstall only if the
file is missing.
|
o
|
Reinstall if the file
is missing or is an older version.
|
e
|
Reinstall if the file
is missing, or is an equal or older version.
|
d
|
Reinstall if the file
is missing or a different version is present.
|
c
|
Verify the checksum
values, and reinstall the file if they are missing or corrupt. This flag only
repairs files that have msidbFileAttributesChecksum in the Attributes column
of the File Table.
|
a
|
Force all files to be
reinstalled, regardless of checksum or version.
|
u
|
Rewrite all required
registry entries from the Registry Table that
go to the
HKEY_CURRENT_USER
or
HKEY_USERS
registry hive.
|
m
|
Rewrite all required registry entries from
the Registry Table that
go to the
HKEY_LOCAL_MACHINE
or
HKEY_CLASSES_ROOT
|
s
|
Reinstall all shortcuts and re-cache all
icons overwriting any existing shortcuts and icons.
|
v
|
Use to run from the source package and
re-cache the local package. Do not use the v reinstall option code for the
first installation of an application or feature.
|
Comments
Post a Comment