#$Microsoft Installer Objects
MsiAuto object
MsiConfigurationManager object
MsiControl object
MsiCursor object
MsiData object
MsiDatabase object
MsiDialog object
MsiDialogHandler object
MsiDirectoryManager object
MsiEngine object
MsiEvent object
MsiFileCopy object
MsiFilePatch object
MsiHandler object
MsiMalloc object
MsiMessage object
MsiPath object
MsiRecord object
MsiRegKey object
MsiSelectionManager object
MsiServices object
MsiServer object
MsiStorage object
MsiStream object
MsiString object
MsiSummaryInfo object
MsiTable object
MsiView object
MsiVolume object
Methods common to all objects

#$KMicrosoft Installer Object Hierarchy
All objects are derived ultimately from a common base class. C++ objects are COM classes derived from the IUnknown interface. Automation objects (except MsiAuto) are wrappers for C++ COM pointers, are derived from an internal class, CAutoBase, and are exposed as IDispatch interfaces. Where multiple interfaces are implemented by the same object, they are joined by a plus sign, "+". Objects derived from a base class are shown as indented under that base object.
Objects Created from Module Class Factories
MsiAuto
MsiServices
MsiMessage
	MsiHandler
	MsiEngine + MsiSelectionManager + MsiDirectoryManager
MsiConfigurationManager
MsiServer object
Objects Created by Methods of Other Objects
MsiData
	MsiString
	MsiTable
	MsiStream
	MsiDialog + MsiEvent
	MsiControl
MsiMalloc
MsiRecord
MsiVolume
MsiPath
MsiFileCopy
MsiFilePatch
MsiRegKey
MsiDatabase
MsiView
MsiCursor
MsiStorage
MsiSummaryInfo
#$Methods and Properties Common to all Objects
These methods are inherited into all automation classes, and are provided to allow querying of the underlying COM interfaces associated with each object. A common need is to be able to convert an MsiData object stored in a record or database to its derived object type.
Properties
HasInterface
RefCount
Methods
GetInterface
Remarks
These items don't apply to the MsiAuto object.
#$+KHasInterface Property
	MsiBase Object	Msi Objects	Database Tables
A boolean indicating whether the underlying COM object supports the indicated interface.
Syntax
object.HasInterface(iid)
object
Required. The MsiBase object.
iid
Required. Integer representing the interface ID to be queried, iidMsi???.   Constants are defined in the type library for the Installer interfaces.
Remarks
This property doesn't apply to the MsiAuto object.
#$+KRefCount Property
	MsiBase Object	Msi Objects	Database Tables
The reference count of the underlying COM object.
Syntax
object.RefCount
object
Required. The MsiBase object.
Remarks
This the reference count of the C++ implementation object, not of the automation IDispatch wrapper object. The automation wrapper will account for one reference count, unless the underlying object is null, in which case the reference count will be zero. The preceeding happens when an null MsiData object is accessed from a database cursor.
#$+KGetInterface Method
	MsiBase Object	Msi Objects	Database Tables
Returns a new object containing the requested interface, by requesting the interface from the underlying COM object. An error will be generated if the interface cannot be obtained.
Syntax
object.GetInterface(iid)
object
Required. The MsiBase object.
iid
Required. Integer representing the interface ID to be queried, iidMsi???.   Constants are defined in the type library for the Installer interfaces.
Remarks
This method doesn't apply to the MsiAuto object.
#$K+MsiAuto Object
An MsiAuto object must be initially created in order to load the automation support that is required in order to access the Microsoft Installer components through OLE automation. This object provides wrappers to create the top level objects and access their methods.
Methods
CreateServices
CreateEngine
CreateHandler
CreateMessageHandler
CreateConfigurationManager
OpcodeName
ShowAsserts
SetDBCSSimulation
AssertNoObjects
SetRefTracking

#$+KCreateServices Method
	MsiAuto Object	Msi Objects	Database Tables
This methods loads the Msi (kernel) library and creates a MsiServices object. If no parameter is supplied, the method attempts to load "Msi.DLL" from the current directory.
#$+KCreateEngine Method
	MsiAuto Object	Msi Objects	Database Tables
This methods loads the Msi (kernel) library and creates a MsiEngine object.      If no engine parameter is supplied, the method  attempts to load "Msi.DLL" from the current directory.
#$+KCreateHandler Method
	MsiAuto Object	Msi Objects	Database Tables
This methods loads the message handler library and creates a MsiHandler object. The kernel library (msi.dll) should be loaded first. If no handler library parameter is supplied, the method attempts to load "MsiHnd.DLL" from the current directory.
#$+KCreateMessageHandler Method
	MsiAuto Object	Msi Objects	Database Tables
This methods loads the given library and creates a MsiMessage object. The kernel library (msi.dll) should be loaded first. If no handler library parameter is supplied, the method uses the registered kernel DLL.
#$+KCreateConfigurationManager Method
	MsiAuto Object	Msi Objects	Database Tables
This methods creates an MsiConfigurationManager object. Currently this is  stored in the kernel library. See CreateEngine for more information.
#$+KCreateExecutor Method
	MsiAuto Object	Msi Objects	Database Tables
This methods creates an MsiExecute object. Currently this is stored in the kernel library. See CreateEngine for more information.
#$+KOpcodeName Property
	MsiAuto Object	Msi Objects
The enumerated name for the numeric opcode value. Read-only.
Syntax
object.OpcodeName(opcode)
object
Required. The MsiAuto object.
opcode
Required. The numeric value of the opcode.
Remarks
The enumeration is generated from the "opcodes.h" header file. Undefined opcodes will cause an error to be generated.
#$+KShowAsserts Method
	MsiAuto Object	Msi Objects

Syntax
object.ShowAsserts(Flag)
object
Required. The MsiAuto object.
Flag
Required. Should be False to hide asserts and True to show asserts.
Remarks
This method sets an internal flag in each of the standard Installer component DLLs to control display of assert messages, and will be functional only for component objects that have already been created. NOTE: Only available in DEBUG components, which support the IMsiDebug interface.
#$+KSetDBCSSimulation Method
	MsiAuto Object	Msi Objects

Syntax
object.SetDBCSSimulation(leadByte)
object
Required. The MsiAuto object.
leadByte
Required. The numeric value of a character that will be recognized by the MsiString object implementation as the lead byte of a double-byte sequence.
Remarks
This method is exposed to facilitate testing of the DBCS string handling on a non-DBCS system. NOTE: Only available in DEBUG components, which support the IMsiDebug interface
#$+KAssertNoObjects Method
	MsiAuto Object	Msi Objects

Syntax
object.AssertNoObjects
object
Required. The MsiAuto object.
Remarks
This asserts that none of the objects being reference tracked are still allocated. It is for debugging purposes from VB in order to help track down reference counting problems. See Reference Tracking  for more information on reference tracking in Darwin. NOTE: Only available in DEBUG components, which support the IMsiDebug interface
#$+KSetRefTracking Method
	MsiAuto Object	Msi Objects

Syntax
object.SetRefTracking(iid, fTrack)
object
Required. The MsiAuto object.
iid
Required. The iid of the class you wish to turn reference tracking on or off.
fTrack
Required. True or false indicating whether to turn tracking on or off.
Remarks
This allows you to turn reference tracking on or off for objects created after this point.  It does not affect objects already created when the call is made. See Reference Tracking  for more information on reference tracking in Darwin. NOTE: Only available in DEBUG components, which support the IMsiDebug interface
#$K+MsiMessage Object
	Msi Objects	Database Tables
The MsiMessage object is an independent object that supports simple UI: error handling and progress indications. It is a base class of MsiEngine and MsiHandler, which support more extensive UI control. Objects supporting this interface can be passed to the install server to receive notifications.
Methods
Message

#$+KMessage Method
	MsiMessage Object	Msi Objects	Database Tables
Accepts a message type and parameters and returns a result code. This is called by installer components to request UI handling and to provide progress notifications. It is implemented by UI handlers, and also by MsiEngine which intercepts it to supply formatting strings and logging services.
Syntax
object.Message(kind, record)
object
Required. The MsiMessage object, or a derived object such as MsiHandler or MsiEngine
kind
Required. The message type, one of imtEnum, described below, combined with button styles where appropriate
record
Required. An MsiRecord object containing message-specific field.
Message Types
imtOutOfMemory   out of memory, may be called recursively
imtError         error message,   (1) is imsg/idbg error code
imtWarning       warning message, (1) is imsg/idbg code, not fatal
imtUser          user request,    (1) is imsg/idbg code
imtInfo          informative message for log, not to be displayed
imtDiagnostic    debug notification, displayed only if no log
imtCommonData    info for UI: (1)=message type (2,...) arguments
      imtCommonData message types:
		(1)=1     (2)=language id
		(1)=2     (2)=dialog caption
		(1)=3     (2)=boolean, show/hide cancel button
imtActionStart   start of action, (1) action name, (2) description
imtActionData    data associated with individual action item
imtProgress      progress gauge info, (1) units so far, (2) totalimtActionDone    end of actions, dismiss modeless progress dialog

MessageBox Button Styles - identical to Win32 definitions
imtOk                 MB_OK  (default)
imtOkCancel           MB_OKCANCEL
imtAbortRetryIgnore   MB_ABORTRETRYIGNORE
imtYesNoCancel        MB_YESNOCANCEL
imtYesNo              MB_YESNO
imtRetryCancel        MB_RETRYCANCEL
MessageBox Icon Type- identical to Win32 definitions, default is none
imtIconError          MB_ICONERROR
imtIconQuestion       MB_ICONQUESTION
imtIconWarning        MB_ICONWARNING
imtIconInfo           MB_ICONINFORMATION
Default Button - identical to Win32 definitions, default is first
imtDefault1           MB_DEFBUTTON1
imtDefault2           MB_DEFBUTTON2
imtDefault3           MB_DEFBUTTON3
Return Codes - mapped to Win32 button events
imsError  = -1   error in message handlerimsNone   =  0   no action taken
imsOk     =  1   IDOK
imsCancel =  2   IDCANCEL
imsAbort  =  3   IDABORT
imsRetry  =  4   IDRETRY
imsIgnore =  5   IDIGNORE
imsYes    =  6   IDYES
imsNo     =  7   IDNO

#$K+MsiEngine Object
	Msi Objects	Database Tables
The MsiEngine object controls the installation process. It relies on an MsiServices object to perform all of the operating system functions. It opens the install database, which contains the installation tables and data. It defers all error handling and user interactions to the MsiHandler object. The MsiEngine object is associated with a standard set of action functions, each which performs particular operations on data from one or more tables. Additional custom actions may be added for particular product installations. The basic engine function is a sequencer which fetches sequential records from a designated "sequence" table (such as InstallSequence), evaluates any specified condition expression and executes the designated action. Actions not recognized by the engine are deferred to the MsiHandler object for processing.
Properties
ConfigurationServer
Database
DirectoryManager
Handler
Property
SelectionManager
Services

Methods
DoAction
EvaluateCondition
FormatText
Initialize
Message
SelectLanguage
OpenView
Terminate
ResolveFolderProperty
Sequence
ExecuteRecord
ValidateProductID
GetMode
SetMode

Engine Initialization Processing
The following methods and properties are normally call by the loader:
Initialize method - initializes components and database using values passed in arguments.
DoAction method - commences installation by calling a top level action, typically "Install".
Terminate method - releases all data and references held by the engine.
#$+KServices Property
	MsiEngine Object	Msi Objects	Database Tables
The MsiServices object used by the engine, obtained from the MsiServer object when the engine was created.Read-only.
Syntax
object.Services
object
Required. The MsiEngine object.
#$+KConfigurationServer Property
	MsiEngine Object	Msi Objects	Database Tables
The MsiServer object used by the engine, created when the engine object was created. Read-only.
Syntax
object.ConfigurationServer
object
Required. The MsiEngine object.
#$+KHandler Property
	MsiEngine Object	Msi Objects	Database Tables
The MsiHandler object used by the engine. This is initially set by the Initialize method of MsiEngine, to either the default handler in the engine, or the the external handler component, depending upon the UI level supplied to Initialize.
Syntax
object.Handler
object
Required. The MsiEngine object.
#$+KDatabase Property
	MsiEngine Object	Msi Objects	Database Tables
The name of the primary MsiDatabase object used by the engine. This is set during the Initialize method of MsiEngine.
Syntax
object.Database
object
Required. The MsiEngine object.
#$+KProperty Property
	MsiEngine Object	Msi Objects	Database Tables
The string value of a named Installer property, as maintained by the MsiEngine object in the in-memory Property table, or if prefixed with a percent sign (%), the value of a system environment variable for the current process. Either string or integer values may be supplied. A non-existent property or environment variable is equivalent to its value being null. Read-write.
Syntax
object.Property(name)
object
Required. The MsiEngine object.
name
Required. The case-sensitive name of a property, or a case-insensitive name of an environment variable prefixed by a percent sign.
Remarks
For a list of common properties, see Property Summary.
#$+KSelectionManager Property
	MsiEngine Object	Msi Objects	Database Tables
The MsiSelectionManager object associated with the engine. Read-only.
Syntax
object.SelectionManager
object
Required. The MsiEngine object.
#$+KDirectoryManager Property
	MsiEngine Object	Msi Objects	Database Tables
The MsiDirectoryManager object associated with the engine. Read-only.
Syntax
object.DirectoryManager
object
Required. The MsiEngine object.
#$+KFormatText Method
	MsiEngine Object	Msi Objects	Database Tables
Takes a string and returns a string where the property names are resolved.
If a substring of the form [propertyname] is encountered, it is replaced by the value of the property.
The square brackets can be iterated, the property names are resolved from inside out.
If a substring of the form [%environmentvariable] is found, the value of the environment variable is substituted. 
If a substring of the form [#filekey] is found, it is replaced by the full path of the file, with the value filekey used as a key into the File table. 
If a substring of the form [$componentkey] is found, it is replaced by the install directory of the component, with the value componentkey used as a key into the Component table taking into account the Component.Action column state. If the component is selected to be installed locally it is replaced by the target directory, if the component is selected for run from source it is replaced by the source directory, and if the component is not selected or missing it is replaced by a null string.
If a substring of the form [] is found, it is replaced by the character without any further processing. Only the first character after the backslash is kept, everything else is removed. If a part of the string is enclosed in { }, and contains no square brackets, it is left unchanged, including the curly braces.
If a part of the string is enclosed in { }, and contains one or more property name; if all the properties are found, the text (with the resolved substitutions) is displayed without the curly braces. If any of the properties is not found, all the text in the braces, and the braces themselves are removed.

Syntax
object.FormatText(text)
object
Required. The MsiEngine object.
text
Required. The string to be formatted
Remarks
If some square brackets or curly braces have no matching pair, they will be left in the text.
#$+KEvaluateCondition Method
	MsiEngine Object	Msi Objects	Database Tables
Evaluates an logical expression containing symbols and values, and returns an integer of the enumeration iecEnum, as described below.
Syntax
object.EvaluateCondition(condition)
object
Required. The MsiEngine object.
condition
Required. A string containing the logical expression.
Expression Syntax
 value ::= symbol | literal | integer
 comparison-operator ::= < | > | <= | >= | = | <>
 term ::= value | value comparison-operator value | ( expression )|
 boolean-factor ::= term | NOT term
 boolean-term ::= boolean-factor | boolean-factor AND term
 expression ::= boolean-term | boolean-term OR expression
 symbol ::= property | %environment-variable | $component-action | ?component-state | &feature-action | !feature-state

All symbol names and values are case-sensitive, except that environment variable names are case-insensitive.
Operators are case-insensitive.
Literal text must be enclosed in double quotes.
Floating point numeric values are not supported.
Operators and precedence: same as BASIC and SQL languages.
Arithmetic operators are not supported.
Supported operators: Or And Not Xor Eqv Imp < <= = <> >= > () .
Non-existent property values are treated as empty strings.
Comparison of an integer with a string or property value that cannot be converted to an integer is always iecFalse, except for the comparison operator '<>' which returns iecTrue.
Parentheses may be used to override operator precedence.
For string comparisons, a tilde '~' prefixed to the operator will perform a case-insensitive compare.
Symbol Types
Symbol Type	Prefix	Value	
Installer property	(none)	value of property (Property table)	
Environment variable	%	value of environment variable	
Component table key	&	action state of the component	
Component table key	!	installed state of the component	
Feature table key	&	action state of the feature	
Feature table key	!	installed state of the feature	

Return Values
iecFalse = 0  - expression evaluates to False
iecTrue  = 1  - expression evaluates to True
iecNone  = 2  - expression not present, caller decides interpretation
iecError = 3  - syntax error in expression, cannot be evaluated
Logical Operators, high to low precedence
Not  - prefix unary operator, inverts state of following term
And  - True if both terms True
Or   - True if either or both terms True
Xor  - True if either but not both terms True
Eqv  - True if both terms True or both False
Imp  - True if left term False or right term True
Comparison Operators, can occur only between two values
=    - True if left value is equal to right value
<>   - True if left value is not equal to right value
>    - True if left value is greater than right value
>=   - True if left value is greater than or equal to right value
<    - True if left value is less than right value
<=   - True if left value is less than or equal to right value
Substring Operators, when present between two string values
><   - True if left string contains the right string
<<   - True if left string starts with the right string
>>   - True if left string ends with the right string
Bitwise Numeric Operators, when present between two integer values
><   - Bitwise AND, True if left and right integers have any bits in common<<   - True if the high 16-bits of left integer equals the right integer
>>   - True if the low 16-bits of the left integer equals the right integer
Feature and Component State Values
0 (iisAbsent) - feature or component not present
1 (iisLocal)  - feature or component on local machine
2 (iecSource  - feature or component run from source
(null value)  - no action to be taken on feature or component
Note: these states are not set until the SetInstallLevel method is called, either directly or by the CostFinalize action. Therefore, state checking is generally only useful in conditional expression in an action sequence table.
#$+KInitialize Method
	MsiEngine Object	Msi Objects	Database Tables
Validates and opens the database, initializes the engine, handler, Property table. Fails if the database is incompatible or does not contain Property and Error tables. Returns an integer enumeration indicating the result. If an error occurs, the handler is not initialized and cannot display the error; therefore the responsibility of the caller to handle the error.
Syntax
object.Initialize(database, uiLevel, commandLine)
object
Required. The MsiEngine object.
database
Required. Name or path to the database file. The engine interprets this string and attempts to create the corresponding MsiDatabase object. The MsiDatabase object must contain the Error table, and the Property table. The Property table must contain the ProductVersion, ProductLanguage, and ProductCode properties for the initialization to succeed. To facilitate component testing, if an empty string is supplied, a temporary database will be created containing an empty Property table.
uiLevel
Optional. The interaction level of the UI, one of the following:
iuiFull    = 0   default, full interactive UI
iuiReduced = 1   progress and errors, no modeless dialogs (wizards)
iuiBasic   = 2   progress and errors using engine default handler
iuiNone    = 3   no UI

commandLine
Optional. String containing property definitions, normally launcher command line. These properties will override those in the resources of the launcher EXE, The property name will be forced to upper case; the value is case-sensitive. All externally settable properties are named entirely with upper case letters. White space around the equals sign is optional. Spaces within the value text are preserved if the value is quoted. In addition to the property=value syntax, a selected set of letter options are interpreted.
Operations performed by MsiEngine.Initialize
 1. Loads property table if in UI preview mode. Goto step 15.
 2. If a database wasn't passed in via the database parameter, attempts to locate DATABASE= on the command-line and use this as the database. If neither the database parameter is set nor DATABASE= specifed on the command-line, creates a temporary database and property table.
 3. Evaluates the uiLevel argument and displays a startup window if not totally quiet.
 4. Copies the database to the TEMP folder if running from a floppy    or other removable media.
 5. Reads and validates the SummaryInformation stream (_SummaryInformation table if ODBC database).
 6. Checks database version against the engine and services objects.
 7. Authenticates the database (if enabled) 8. Determines which language to use. The language is chosen using the  following steps, until a language is found:
      a. If a language is advertised for the product then it is used. If the  database doesn't support this language then ieiLanguageUnsupported is returned.
      b. If a language is specified on the command-line for the product then it is  used. If the database doesn't support this language then ieiLanguageUnsupported  is returned.
      c. If a language supported by the database is the same as the user's  default language then it is used.
      d. If a language supported by the database is the primary language of  the user's default language then it is used.
      e. If the primary language of a language supported by the database is  the primary language of the user's default language then it is used.
      f. If there is only one language supported by the database for which  the system has locale information then it is used.
      g. The user is presented with a choice of language for which the system  has locale information. The chosen language is used.
      h. An error, ieiLanguageUnsupported, is returned.
 9. Opens the database, read-only unless PID_SECURITY property is set to 0.
10. Applies language transform if a language other than the base language is chosen.
11. Initializes database transforms, if transforms have been advertised or the TRANSFORMS property is set
12. Loads Property table from the opened database.
13. Loads Error table and caches message headers from that table.
14. Adds user registration properties from the registry.
15. Processes property settings from the string passed in the commandLine argument.
16. Sets the operating system and hardware properties using MsiServices.SetPlatformProperties.
17. Creates an MsiExecute object to execute operations, directly or via script.
18. Initializes the log if LOGFILE property is set.
19. Set the UI interaction level, creates instance of MsiHandler if full UI.
20. Initializes the MsiHandler object, supplying this engine object.
21. Checks whether an install is in progress and performs the following steps if one is:
      a. If the install was started by a different user then it's silently rolled back
	  b. Otherwise, if it's the same user, but a different product then the user is given the option to either roll back the partial install or exit
      c. Otherwise, if it's the same user, same product, but has different in-progress properties, then the user is given the option to either roll back the partial install or exit
	  d. Otherwise, if it's the same user and same product then the previously  started install is resumed.

Return Values
ieiSuccess             =  0   initialization complete
ieiAlreadyInitialized  =  2   this engine object is already initialized
ieiCommandLineOption   =  3   invalid command line syntax
ieiDatabaseOpenFailed  =  5   database could not be opened
ieiDatabaseInvalid     =  6   incompatible database
ieiInstallerVersion    =  7   installer version does not support database format
ieiSourceAbsent        =  8   couldn't resolve the source
ieiHandlerInitFailed   = 10   could not initialize handler interface
ieiLogOpenFailure      = 11   could not open logfile in requested mode
ieiLanguageUnsupported = 12   no acceptable language could be found
ieiPlatformUnsupported = 13   no acceptable platform could be foundieiTransformFailed     = 14   database transform failed to merge
ieiSignatureRejected   = 15   digital signature rejected
ieiDatabaseCopyFailed  = 16   could not copy database to temp dir
ieiPatchPackageOpenFailed  = 17  could not open patch package
ieiPatchPackageInvalid     = 18  patch package invalid
ieiTransformNotFound       = 19  transform file not found
ieiPatchPackageUnsupported = 20  patch package unsupported (unsupported patching engine?)
ieiPackageRejected         = 21  package cannot be run because of security reasons
ieiProductUnknown          = 22  attempt to uninstall a product you haven't installed
ieiDiffUserAfterReboot     = 23  different user attempting to complete install after reboot
ieiProductAlreadyInstalled = 24  product has been installed already w/ a different package
ieiTSRemoteInstallDisallowed = 25  can't do installations from a remote session on Hydra

#$+KSetMode Method
	MsiEngine Object	Msi Objects	Database Tables
Sets a particular mode to the on or off state.
Syntax
object.SetMode(mode, state)
object
Required. The MsiEngine object.
mode
The mode to turn on or off. Possible values are any iefEnum value from engine.h.

state
Boolean. True to turn mode on, false to turn mode off.
#$+KGetMode Method
	MsiEngine Object	Msi Objects	Database Tables
Gets the current mode bits.  The return is a bit flag.  Values are defined as iefEnum in engine.h.
Syntax
object.GetMode()
object
Required. The MsiEngine object.
state

#$+KTerminate Method
	MsiEngine Object	Msi Objects	Database Tables
Terminates the engine operations and releases references and data. This method must be called before the engine is released. After this method, the engine is returned to the uninitialized state, and the Initialize method may be called again.
Syntax
object.Terminate(state)
object
Required. The MsiEngine object.
state
The return status of the last executed action. See the DoAction method for possible values. This value is passed to the server to determine how to handle rollback and the in-progress information for the install. See InstallFinalize for more information.
Return Values
Returns the given state, or iesSuspend if the install was suspended.
#$+KDoAction Method
	MsiEngine Object	Msi Objects	Database Tables	Msi Actions
Executes the action function corresponding to the name supplied. If the name is not recognized by the engine as a build-in action or as a custom action in the CustomAction table, the name is  passed to the DoAction method of the MsiHandler object, which may either invoke a function or a dialog. If a null action name is supplied, the engine uses the upper-cased value of the ACTION property as the action to perform. If no property value is defined, the default action is performed, currently defined as "INSTALL". This method returns an integer enumeration as described below.
Syntax
object.DoAction(action)
object
Required. The MsiEngine object.
action
Required. The string name of the action to execute, case-sensitive.
Return Values
iesNoAction       = 0   action not invoked, most-likely does not exist.
iesSuccess        = 1   IDOK, completed actions successfully.
iesUserExit       = 2   IDCANCEL, user terminated prematurely.
iesFailure        = 3   IDABORT, unrecoverable error occurred.
iesSuspend        = 4   IDRETRY, sequence suspended, to be resumed later.
iesFinished       = 5   IDIGNORE, skip remainin actions, not an error
iesWrongState     = 6   calling sequence error, not in initialized state.
iesBadActionData  = 7   from Sequence(), invalid Action table record data.
#$+KSequence Method
	MsiEngine Object	Msi Objects	Database Tables
Opens a query on the specified table, ordering the actions by the numbers in the 'Sequence' column.  For each row fetched, the DoActionMsiDatabase_DoAction method is called, provided that any supplied condition expression does not evaluate to False. Returns an enumeration iesEnum, as described in the DoAction method.
Syntax
object.Sequence(table)
object
Required. The MsiEngine object.
table
Required. The string name of the table to use for sequencing.
Remarks
This method is meant to be called internally by top-level actions.
#$+KMessage Method
	MsiEngine Object	Msi Objects	Database Tables
Performs any enabled logging operations and defers exection to the Message method of the MsiHandler object associated with the engine. Logging may be selectively enabled for the various message types.  See uldb MsiMessage.Message for message types and return codes.
Syntax
object.Message(kind, record)
object
Required. The MsiEngine object.
kind
Required. The message type, one of imtEnum, as described in MsiMessage.Message
record
Required. An MsiRecord object containing message-specific field.
Processing by Message Types
imtOutOfMemory   logged if 'm' in LOGMODE, passed to handler
imtError         logged if 'e' in LOGMODE, passed to handler
imtWarning       logged if 'w' in LOGMODE, passed to handler
imtUser          logged if 'u' in LOGMODE, passed to handler
imtInfo          logged if 'i' in LOGMODE, not passed to handler
imtDiagnostic    logged if 'd' in LOGMODE, not passed to handler if log enabled
imtCommonData       logged if 'c' in LOGMODE, passed to handler to cache
imtActionStart   logged if 'a' in LOGMODE, passed to handler for progress display
imtActionData    logged if 'r' in LOGMODE, passed to handler for progress display
imtProgress      never logged, passed to handler progress gaugeimtActionDone    never logged, passed to handler to remove progress dialog
#$+KSelectLanguage Method
	MsiEngine Object	Msi Objects	Database Tables
Displays a dialog various type of messages and notifications. See table below. Returns an integer of the enumeration imsEnum.
Syntax
object.SelectLanguage(languages, caption)
object
Required. The MsiEngine object.
languages
Required. A string containing a list of decimal integer language IDs, separated by semicolons.
caption
Optional. A string designating the caption to display on the language select dialog. No caption bar will be displayed if no caption is supplied.
Return Codes, one of islEnum
 islSystemError   = -3   Error creating selection window
 islSyntaxError   = -2   Language ID missing, zero, or non-numeric
 islNoneSupported = -1   None of the languages are supported by system
 islUserExit      =  0   User closed window with Escape or terminate
 positive value   >  0   Index of language selected (1-based)
Remarks
This is the only method of MsiEngine that may be called before Initialize, as it does not make any use of the database (in fact, it is called by Initialize). Languages not supported by the system will not be displayed. Normally MsiEngine.Initialize will scan the languages and call this method only if it cannot pick the best match and if multiple languages are supported by the system.
#$+KOpenView Method
	MsiEngine Object	Msi Objects	Database Tables
Simply a wrapper which defers to the OpenView method of the current MsiDatabase object associated with the engine.
Syntax
object.OpenViewSQL(sql, intent)
object
Required. The MsiEngine object.
sql
Required. The SQL query string.
intent
Required. The combination of operations intended on the MsiView object.
#$+KOpenView Method
	MsiEngine Object	Msi Objects	Database Tables
Either executes or spools and operation, depending on the current mode of execution. If the EXECUTEMODE property indicates direct execution, the operation is executed immediately.  Otherwise, the operation is added to the current script. If no script has been created yet, a script is created and the ixoHeader, ixoProductInfo, ixoDialogInfo and ixoRollbackInfo operations are added before this operation.
Syntax
object.ExecuteRecord(opcode, params)
object
Required. The MsiEngine object.
opcode
Required. The opcode of the operation to execute.
params
Required. An MsiRecord object containing the arguments for this operation.
#$+KResolveFolderProperty Method
	MsiEngine Object	Msi Objects	Database Tables
This method insures that the designated property contains a full path to a folder. If the property does not exist, it is create with the folder of the database passed to the Initialize method. If a partial path is supplied, i.e. not commencing with a drive letter or UNC path, the partial path is prefixed with the database folder. Partial paths beginning with a dot or double dot are not supported. The method returns a boolean indicating whether the property was initially defined or not.
Syntax
object.ResolveFolderProperty(property)
object
Required. The MsiEngine object.
property
Required. Name of the property to be resolved.  
#$+KValidateProductID Method
	MsiEngine Object	Msi Objects	Database Tables
This method returns a boolean value indicating if the Product ID is valid. In maintenance mode or if the PIDTemplate property is missing the method always returns true. Otherwise it compares the content of the PIDTemplate property and the PRODUCTID property. It also supplies the random digits and verifies the checksum. For a description of the syntax of the template, see the MaskedEdit control description. The PRODUCTID property should initially contain the part of the PID that is entered by the user. If the entry is validated, the PIDTemplate property is removed, and the PRODUCTID property is set to the complete validated value. Otherwise both properties remain unchanged. If there is a CCP digit in the template, the value of that digit is stored in the CCPTrigger property. This method is called from the CostInitialize action, in order to validate the PID if possible before the wizard sequence. If it fails, the user is asked for the input by the UI. The UI calls this method again to validate the entry and blocks further steps untill a valid entry is received. The method is also called from the InstallValidate action, where it blocks the installation if the validation failed.
Syntax
object.ValidateProductID()
object
Required. The MsiEngine object.
#$K+MsiCostAdjuster Object class
	Msi Objects	Database Tables
MsiCostAdjuster objects are created by special costing actions, which are responsible for both the implementation and exposure of the object through the MsiCostAdjuster interface.  For this reason, these objects cannot be created or accessed via automation.
 
See the CostInitialize and RegisterCostAdjuster topics for details on the creation and usage of MsiCostAdjuster objects.
Methods
GetDynamicCost

#$+KGetDynamicCost method
	MsiCostAdjuster Object	Msi Objects	Database Tables
The GetDynamicCost method is responsible for calculating the total disk space cost associated with a specified Component table entry, and returning the result.  Note that because the actual implementation of each type of MsiCostAdjuster object is supplied by various Installer actions, the actual calculations performed by GetDynamicCost are implementation-specific.
Syntax
IMsiRecord* piRec = object->GetDynamicCost(ristrComponent, riDestPath,iDynamicCost);
object
Required. The MsiCostAdjuster object.
IMsiString& ristrComponent
Required. A reference to the string name of the component in the Component table that needs to be dynamically recosted.

IMsiPath& riDestPath
Required. a reference to a path object that represents the directory path associated with the component.

int& iDynamicCost
Required. a reference through which the dynamic cost as calculated by GetDynamicCost is returned to the caller.

Remarks
For each MsiCostAdjuster object that is registered with the Selection Manager using the RegisterCostAdjuster method, the GetDynamicCost method of that object will be called whenever the disk space cost associated with a specified component needs to be re-calculated.  For instance, when the CostFinalize action is executed, every component needs to be initialized, so all MsiCostAdjuster objects will be called once for each entry in the Component table. Later, if the directory and/or selection state associated with any component changes (i.e. through UI user interaction), the affected component(s) will be recosted, causing all MsiCostAdjuster objects to be called again.
 
 See the CostInitialize topic for a complete discussion of costing.
#$K+MsiSelectionManager Object
	Msi Objects	Database Tables
The MsiSelectionManager object, associated with the MsiEngine object, manages the in-memory  Feature,Component and VolumeCost tables. It loads the Feature and Compnent tables from the database and adds temporary columns used in the UI selection and costing actions. The VolumeCost table is temporary and contains the accumulated disk cost.
Other objects, such as MsiHandler, that need to make changes in the 'Select' state of records within the Feature Table will do so via the Selection Manager. For instance, the Handler can get a read-only reference to the loaded Feature Table via the FeatureTable property, and can use a cursor to read values at will from any records and columns in the table.  However, to alter the 'Select' state of a Feature Table record, a selection request must be made through the Selection Manager's ConfigureFeature interface. This is because the Selection Manager must handle the dynamic costing and updating of the 'Select' condition of each Feature record as the selection states of parent and child Feature records change.
During standard installations, the Selection Manager will normally be initialized by executing the CostInitialize action.
Properties
FeatureTable
ComponentTable

Methods
ConfigureFeature
FreeSelectionTables
GetFeatureValidStates
GetFeatureCost
GetDescendentFeatureCost
GetVolumeCostTable
InitializeDynamicCost
InitializeComponents
LoadSelectionTables
ProcessConditionTable
RecostDirectory
RegisterCostAdjuster
SetFeatureHandle
SetInstallLevel
SetComponent

#$+KSetReinstallMode Method
	MsiSelectionManager Object	Msi Objects	Database Tables
Allows the caller to specify the validation mode(s) to be used during a reinstall.  SetReinstallMode should normally be used in conjunction with a call to ConfigureFeature, to specify the feature or features to be reinstalled.
Syntax
object.SetReinstallMode(istrMode)
object
Required. The MsiSelectionManager object.
istrMode
Required. A string containing letters that specify the type of reinstall to perform.  The letters accepted by SetReinstallMode are identical to those specified for the REINSTALLMODE property.
Remarks
The SetInstallLevel method must be called before calling SetReinstallMode.
#$+KFeatureTable Property
	MsiSelectionManager Object	Msi Objects	Database Tables
Returns the loaded Feature table as an MsiTable object. Returns an object set to Nothing if table is not loaded. Read only.
Syntax
object.FeatureTable
object
Required. The MsiSelectionManager object.
#$+KComponentTable Property
	MsiSelectionManager Object	Msi Objects	Database Tables
Returns the loaded Component table as an MsiTable object. Returns an object set to Nothing if table is not loaded. Read only.
Syntax
object.ComponentTable
object
Required. The MsiSelectionManager object.
#$+KGetVolumeCostTable method
	MsiSelectionManager Object	Msi Objects	Database Tables
Returns the loaded VolumeCost table as an MsiTable object. Returns an object set to Nothing if table is not loaded. Read only.
Syntax
object.GetVolumeCostTable()
object
Required. The MsiSelectionManager object.
Remarks
The VolumeCost table is a temporary table that is created in-memory by the SelectionManager.  The purpose of this table is to track the total disk space cost of the current install, on a volume by volume basis.  The VolumeCost table consists of two columns: 
VolumeObject
Primary key, containing a pointer to an IMsiVolume object.

VolumeCost
Long integer specifying the total disk space cost attributed to this volume for the current install.

Note: the value in the VolumeCost column will be accurate only after the CostFinalize action has been executed.  See the CostInitialize topic for a complete discussion of costing.
#$+KGetFeatureValidStates method
	MsiSelectionManager Object	Msi Objects	Database Tables
This method returns as the function result an integer representing bit flags, with each relevant bit representing a 'valid' installation state for the specified feature.
Syntax
object.GetFeatureValidStates(feature)
object
Required. The MsiSelectionManager object.
feature
Required. String name of feature item whose valid installation states are to be retrieved.
Remarks
The return value is composed of bit flags, as follows:

Bit 0: if set, 'iisLocal' is a valid state.
Bit 1: if set, 'iisSource' is a valid state.

The GetFeatureValidStates method determines state validity by querying all the components that are linked to the specified feature (without taking into account the current installed state of any component). If any of these components has a value of 'irsOptional' in the RunFromSource column, or if at least one component is marked 'irstLocalOnly' AND at least one other component is marked 'irsSourceOnly', then both 'iisLocal' and 'iisSource' are both valid states for the feature.  If ALL components are set to 'irsLocalOnly', then 'iisLocal' is the only valid state. If ALL components are set to 'irsSourceOnly', then 'iisSource' is the only valid state.

#$+KGetDescendentFeatureCost method
	MsiSelectionManager Object	Msi Objects	Database Tables
This method returns as the function result the total amount of disk space (in units of 512 bytes) required by the specified feature, AND all that feature's children.  For each feature, the total cost is made up of the disk costs attributed to every component linked to the feature.
Syntax
object.GetDescendentFeatureCost(feature,iAction)
object
Required. The MsiSelectionManager object.
feature
Required. String name of feature item whose cost is to be retrieved.
iAction
Required. Specifies the action state to use when determining the feature cost.  For instance, if 'iisLocal' is specified, GetDescendentFeatureCost will return the disk space that would be required were the specified feature and all its children to be installed locally. The following enum values are acceptable:

 iisAbsent  = 0 - cost if feature and all subfeatures were to be removed.
 iisLocal   = 1 - cost if feature and all subfeatures were to be installed locally.
 iisSource  = 2 - cost if feature and all subfeatures were to be installed to run from the source media.
 iisCurrent = 4 - cost if feature and all subfeatures were to be installed in their current action state.

#$+KGetAncestryFeatureCost method
	MsiSelectionManager Object	Msi Objects	Database Tables
This method returns as the function result the total amount of disk space (in units of 512 bytes) required by the specified feature, AND that of all the feature's parents (up to the root of the Feature table).  For each feature, the total cost is made up of the disk costs attributed to every component linked to the feature.
Syntax
object.GetAncestryFeatureCost(feature, iAction)
object
Required. The MsiSelectionManager object.
feature
Required. String name of feature item whose cost is to be retrieved.
iAction
Required. Specifies the action state (iisLocal, iisSource, or iisAbsent) to use when determining the feature cost.  For instance, if iisLocal is specified, GetAncestryFeatureCost will return the disk space that would be required were the specified feature and all its parent features to be installed locally.
#$+KGetFeatureCost method
	MsiSelectionManager Object	Msi Objects	Database Tables
This method returns as the function result the total amount of disk space (in units of 512 bytes) required by the specified feature, NOT including that feature's children or parents.  This total cost is made up of the disk costs attributed to every component linked to the feature.
Syntax
object.GetFeatureCost(feature,iAction)
object
Required. The MsiSelectionManager object.
feature
Required. String name of feature item whose cost is to be retrieved.
iAction
Required. Specifies the action state (iisLocal, iisSource, or iisAbsent) to use when determining the feature cost.  For instance, if iisAbsent is specified, GetFeatureCost will return the disk space freed up (i.e. a negative number) were the feature to be removed.
#$+KRecostDirectory method
	MsiSelectionManager Object	Msi Objects	Database Tables
The RecostDirectory method must be called whenever the path associated with a directory in the Directory table changes.  In response, this method prompts each selection that references the changed directory to recalculate its dynamic cost.

Syntax
object.RecostDirectory(directoryName, oldPath)
object
Required. The MsiSelectionManager object.
directoryName
Required. String name of directory item in the Directory that has changed.
oldPath
Required. An MsiPath object that represents the directory item's path before the change.
Remarks
The RecostDirectory method should be called only after the InitializeDynamicCost method has been called (this is normally done by the CostFinalize action). RecostDirectory will typically be called only by the DirectoryManager.
 
 See the CostInitialize topic for a complete discussion of costing.
#$+KLoadSelectionTables Method
	MsiSelectionManager Object	Msi Objects	Database Tables
Loads the Feature and Component tables into memoryand adds temporary columns used during costing and UI selection.
Syntax
object.LoadSelectionTables()
object
Required. The MsiSelectionManager object.
Remarks
LoadSelectionTable must be called before calling any other SelectionManager method.
#$+KInitializeDynamicCost Interface Function
	MsiSelectionManager Object	Msi Objects	Database Tables
Initializes the DynamicCost column of each record in the Component table. InitializeDynamicCost does this by making a call to the GetDynamicCost method of each MsiCostAdjuster object that has been registered with the  Selection Manager, for each component in the Component table.

Note: InitializeDynamicCost is not available via automation - it is only available through the IMsiSelectionManager C++ interface.  This is because dynamic cost calculations can only be performed by registered MsiCostAdjuster objects, and these objects can only be created and registered from C++ (using the RegisterCostAdjuster method).
Syntax
object.InitializeDynamicCost()
object
Required. The MsiSelectionManager object.
Remarks
InitializeDynamicCost must be called only after the Selection Manager has been initialized (which is typically done by the CostInitialize action), and then only after any actions that register dynamic MsiCostAdjuster objects have been executed.
#$+KRegisterCostAdjuster Interface Function
	MsiSelectionManager Object	Msi Objects	Database Tables
Registers a dynamic MsiCostAdjuster object with the Selection Manager.  This object will then be called (through the GetDynamicCost method) whenever the dynamic cost of a component needs to be recalculated.  For example, the FileCost action creates and registers a special "file costing" version of the MsiCostAdjuster interface object.  Then, when called by the Selection Manager, this object is responsible for calculating the actual disk space costs for all the files in the File table that reference the specified component.

Note: RegisterCostAdjuster is not available via automation - it is only available through the IMsiSelectionManager C++ interface.  This is because there is no way to create MsiCostAdjuster objects directly via automation - each different type of object exposed through the MsiCostAdjuster interface is implemented and created internally by the appropriate Installer action.
Syntax
object.InitializeDynamicCost()
object
Required. The MsiSelectionManager object.
Remarks
RegisterCostAdjuster must be called only after the Selection Manager has been initialized (which is typically done by the CostInitialize action).
#$+KFreeSelectionTables Method
	MsiSelectionManager Object	Msi Objects	Database Tables
Frees the in-memory Feature and Component tables, along with the temporary computational and state columns. The final Installed state column will be written to persistent storage.
Syntax
object.FreeSelectionTables()
object
Required. The MsiSelectionManager object.
Remarks
The return value for FreeSelectionTables is a boolean that indicates whether any components remain in an installed state.  If ALL components are absent (i.e. the updated 'Installed' column of the Component table contains either a NULL value, iisAbsent, or issReleased for all components), false will be returned.
#$+KSetFeatureHandle Method
	MsiSelectionManager Object	Msi Objects	Database Tables
Stores an external handle to a Feature item, for use by UI display.
Syntax
object.SetFeatureHandle(feature, handle)
object
Required. The MsiSelectionManager object.
feature
Required. String name of feature item, primary key of Feature table.
handle
Required. Integer handle value to store in designated Feature table row.
Remarks

#$+KProcessConditionTable Method
	MsiSelectionManager Object	Msi Objects	Database Tables
The ProcessConditionTable method loads the Condition Table, and evaluates each conditional expression.  For those expressions that evaluate to iecTrue, the value in the 'Level' column of the appropriate Feature Table entry will be set to the value specified in the Condition Table.
Syntax
object.ProcessConditionTable()
object
Required. The MsiSelectionManager object.
Remarks
The LoadSelectionTables method must be executed prior to executing ProcessConditionTable.  In addition, after executing ProcessConditionTable, the SetInstallLevel method should be called to update the Feature Table 'select' and 'Installed' states.
#$+KInitializeComponents Method
	MsiSelectionManager Object	Msi Objects	Database Tables
The InitializeComponents method initializes all components in the Component table, evaluating the expression in the 'Condition' column of that table (all components for which this conditional evaluates to iecFalse will be permanently disabled).  Note: InitializeComponents does not change the 'Action' state of any component.
Syntax
object.InitializeComponents()
object
Required. The MsiSelectionManager object.
Remarks
The LoadSelectionTables method must be executed prior to executing InitializeComponents.  In addition, after executing InitializeComponents, the SetInstallLevel method should be called - this will update the 'Action' state of each component, based upon the state of the feature(s) in the  Feature table that are linked to a particular component.
#$+KSetInstallLevel Method
	MsiSelectionManager Object	Msi Objects	Database Tables
This method sets the Install Level for the current installation to a specified value, and recalculates the 'Select' and 'Installed' states for all features in the Feature table, and sets the 'Action' state of each component in the Component table, based on the new level.
Syntax
object.SetInstallLevel(installLevel)
object
Required. The MsiSelectionManager object.
installLevel
Required. The requested new install level.
Remarks
The InitializeComponents method must be executed prior to executing SetInstallLevel.
If 0 is passed for the installLevel parameter, the current install level will not be changed, but all features will still be updated based on the current install level.  This functionality  could be used, for example, by the Handler module to reset all selections back to their initial default states, at any point in the UI selection process.
#$+KConfigureFeature Method
	MsiSelectionManager Object	Msi Objects	Database Tables
This method is used to request a change in the 'Select' state of a record in the Feature table, and of that feature's child records. In turn, the 'Action' state of all the components linked to the changed Feature records will also be updated appropriately, based on the new feature 'Select' state. ConfigureFeature can also be used to configure all features at once, by specifying the keyword 'ALL' instead of a specific feature name.
Syntax
object.ConfigureFeature(strFeature, iisState)
object
Required. The MsiSelectionManager object.
strFeature
Required. A string specifying the name of the feature to be configured.  Alternatively, the reserved word "ALL" (case insensitive) can be used, indicating that all features should be configured to the state specified by iisState parameter.  For example, if 'iisAbsent' is specified in the iisState parameter, and "ALL" is specified in the strFeature parameter, the entire product will be removed.
state
Required. Requested selection state, one of the following values:
Null (empty)  :  Requests that no action is to be taken for this item.
iisAbsent    = 0:  item is to be removed.
iisLocal     = 1:  item is to be installed locally.
iisSource    = 2:  item is to be installed from run from the source media.
iisReinstall = 3:  if the feature is installed, reinstall in the same state.

Remarks
The SetInstallLevel method must be called before calling ConfigureFeature.  Also, note that if 'iisReinstall' is specified, the SetReinstallMode method should be called first.
When ConfigureFeature is called, the SelectionManager will attempt to set the 'Action' state of each component tied to the specified feature to the specified state, as best as possible. However, there are common situations when the request cannot be fully honored.  For example, suppose a feature is tied to two components, Component A and Component B (via the  FeatureComponents table, of course).  Also suppose that Component A is authored with a 'RunFromSource' option of 'irsLocalOnly', and Component B is 'irsSourceOnly'.  In this case, if ConfigureFeature is called with a requested state of either 'iisLocal' or 'iisSource', there is no way that the request can be fully honored for both components.  However, both components will be turned 'ON', with component A set to iisLocal, and component B set to iisSource. 
If more than one feature is linked to a single component (a common scenario), the final 'Action' state of that component will be determined as follows: if at least one feature calls for the component to be installed locally, it will be installed 'iisLocal'; else, if at least one feature calls for the component to be run from the source media, it will be installed 'iisSource', else, if at least one feature calls for the removal of the component, the action state will be 'iisAbsent'.
#$+KSetComponent Method
	MsiSelectionManager Object	Msi Objects	Database Tables
This method is used to request a change in the 'Action' state of a record in the Component table. 
Syntax
object.SetComponent(component, state)
object
Required. The MsiSelectionManager object.
component
Required. String name of component item, primary key of Component table.
state
Required. Requested action state, one of the following values:
Null (empty)  :  Requests that no action is to be taken for this item.
iisAbsent    = 0:  item is to be removed.
iisLocal     = 1:  item is to be installed locally.
iisSource    = 2:  item is to be installed from run from the source media.
iisReinstall = 3: if installed, the item is to be reinstalled in the same state.

Remarks
The InitializeComponents method must be called before calling SetComponent.  Also, note that if 'iisReinstall' is specified, the SetReinstallMode method should be called first.
#$K+MsiDirectoryManager Object
	Msi Objects	Database Tables
The MsiDirectoryManager object, associated with the MsiEngine object, manages the in-memory Directory table. It loads the table from the database and stores references to MsiPath objects for each entry in temporary columns.  The source and target path objects may be retrieved from the table and target path objects may be reset to different paths.  Changing the value of a target path object updates any duplicates or children of that path appropriately.
Properties
DirectoryTable

Methods
LoadDirectoryTable
FreeDirectoryTable
CreateTargetPaths
CreateSourcePaths
GetTargetPath
SetTargetPath
GetSourcePath

#$+KDirectoryTable Property
	MsiDirectoryManager Object	Msi Objects	Database Tables
Returns the loaded Directory table as an MsiTable object. Returns an object set to Nothing if table is not loaded. Read only.
Syntax
object.DirectoryTable
object
Required. The MsiDirectoryManager object.
#$+KLoadDirectoryTable Method
	MsiDirectoryManager Object	Msi Objects	Database Tables
Loads the Directory table into memory and adds temporary columns to hold the path objects.
Syntax
object.LoadDirectoryTable()
object
Required. The MsiDirectoryManager object.
Remarks
!!Additional notes!! 
#$+KFreeDirectoryTable Method
	MsiDirectoryManager Object	Msi Objects	Database Tables
Frees the in-memory directory table along the the temporary columns holding the path objects. There is no persistent information to be written to the database.
Syntax
object.FreeDirectoryTable(name, path)
object
Required. The MsiDirectoryManager object.
#$+KCreateTargetPaths Method
	MsiDirectoryManager Object	Msi Objects	Database Tables
Creates the path objects for each target directory and puts the object references in the temporary column added for the target path objects. When not in Admin mode, defines properties for each target directory. Target paths are resolved for each entry in the table in the following way:

Admin mode:
Roots: If no property is defined and the entry is a root of the table, an error will occur.

Non-roots: If the entry is not a root, the path is resolved to be the value of DefaultDir appended to the path resolved for the Directory_Parent entry.
Non-Admin mode:
Properties: If a property by the name of the Directory value is defined, the path is resolved to its value.

Roots: If no property is defined and the entry is a root of the table, the path is resolved to the value of the ROOTDRIVE property.

Non-roots: If no property is defined and the entry is not a root, the path is resolved to be the value of DefaultDir appended to the path resolved for the Directory_Parent entry.

Syntax
object.CreateTargetPaths()
object
Required. The MsiDirectoryManager object.
#$+KCreateSourcePaths Method
	MsiDirectoryManager Object	Msi Objects	Database Tables
Creates the path objects for each source directory and puts the object references in the temporary column added for the source path objects. The source paths are resolved for each entry in the Directory table in the following way:

Roots: The value in the DefaultDir field is assumed to be the name of the property defining the full path of the directory.  If the property is not defined, the value of the defaultPath argument is used.  If this argument is an empty string, an error will occur.

Non-roots: The path of a non-root is resolved to be the value of DefaultDir appended to the path resolved for the Directory_Parent entry. 

Syntax
object.CreateSourcePaths(defaultPath)
object
Required. The MsiDirectoryManager object.
defaultPath
Required. The default path used for source roots when the properties for those roots are undefined.  If an empty string is passed, an error will occur when a source root property is undefined.
Remarks
During a cabinet install, this method only validates the value of the SOURCEDIR property.
#$+KGetTargetPath Method
	MsiDirectoryManager Object	Msi Objects	Database Tables
Returns the MsiPath object associated with the named target directory. If the name does not exist or if the target path objects have not been created, an empty object is returned.
Syntax
object.GetTargetPath(name)
object
Required. The MsiDirectoryManager object.
name
Required. Unique name associated with directory row, primary key.
Remarks

#$+KSetTargetPath Method
	MsiDirectoryManager Object	Msi Objects	Database Tables
Changes the path specification for the MsiPath object associated with a named target directory in the in-memory Directory table. Also, the path specifications of all other path objects in the table that are either children of or equivalent to the changed path are updated to reflect the change.  The properties for each affected path are also updated. In addition, RecostDirectory is called for each affected path.
Syntax
object.SetTargetPath(name, path)
object
Required. The MsiDirectoryManager object.
name
Required. Unique name associated with directory row, primary key.
path
Required. The complete path specification for the directory.
Remarks
If an error occurs in this method, all updated paths and properties are reverted to their previous values, and RecostDirectory is called again for each updated path. Therefore, it is safe to treat errors returned by this method as non-fatal.
#$+KGetSourcePath Method
	MsiDirectoryManager Object	Msi Objects	Database Tables
See MsiGetSourcePath. The 'name' parameter in this method is equivalent to the 'szFolder' parameter in MsiGetSourcePath.
Syntax
object.GetSourcePath(name)
object
Required. The MsiDirectoryManager object.
name
Required. Unique name associated with directory row, primary key.
Remarks
LoadDirectoryTable must be called with addSourcePath set to true before this method is called.

During a cabinet install, this method always returns an MsiPath object representing the path defined by the SOURCEDIR property.
#$K+MsiHandler Object
	Msi Objects	Database Tables
MsiHandler is the class handling the messages sent by the engine. The handler has no interface in the direction of the dialogs, since a generic dialog has no need of talking to the handler. The handler in response to the actions and messages received from the engine starts wizard sequences, puts up individual modal or modeless dialogs, posts progress messages, shows error messages and performs custom actions.
After creating the Handler object, it must be initialized before any other method or property is used. This initialization happens through the Initialize method of the Engine. If any method or property is attempted on an uninitialized Handler object it will assert. Before initialization the Handler object has no access to the Engine or Services, therefore it can not create or send a reasonable error message. At the end of its life a Handler object has to be terminated before it is destroyed. This termination is performed through the Terminate method of the Engine.
Methods
Break
DoAction
Message

#$K+MsiDialogHandler Object
	Msi Objects	Database Tables
MsiDialogHandler is the interface of the Handler which creates and deletes dialogs. To get this interface, use the GetInterface method on an existing MsiHandler.
After creating the Handler object, it must be initialized before any other method or property is used. This initialization happens through the Initialize method of the Engine. If any method or property is attempted on an uninitialized Handler object it will assert. Before initialization the Handler object has no access to the Engine or Services, therefore it can not create or send a reasonable error message. At the end of its life a Handler object has to be terminated before it is destroyed. This termination is performed through the Terminate method of the Engine.
Properties
Dialog
DialogFromWindow

Methods
AddDialog
DialogCreate
RemoveDialog

#$+KMessage Method
	MsiHandler Object	Msi Objects	Database Tables
Processes various type of messages and notifications. See uldb MsiMessage.Message for message types and return codes.
Syntax
object.Message(kind, record)
object
Required. The MsiHandler object.
kind
Required. The message type, one of imtEnum, as described below:
record
Required. An MsiRecord object containing message-specific data fields.
#$+KDoAction Method
	MsiHandler Object	Msi Objects	Database Tables
Request to perform a named action. Normally this is the name of a dialog, which is then constructed from information queried from the UI database tables. However, actions may be implemented as functions. When the DoAction method is called on the MsiEngine object and the requested action is not found, the call is delegated to its MsiHandler object.
Syntax
object.DoAction(action)
object
Required. The MsiHandler object.
action
Required. Name of the action.
#$+KBreak Method
	MsiHandler Object	Msi Objects	Database Tables
Asynchronous call to terminate execution of a DoAction or Message method. If a UI window is waiting in a message loop, this call should indicate that the loop should terminate and return the status: iesUserExit.
Syntax
object.Break
object
Required. The MsiHandler object.
#$+KDialogCreate Method
	MsiDialogHandler Object	Msi Objects	Database Tables
Creates a blank MsiDialog object. All internal variables are uninitialized, the dialog object is not ready for any other call except WindowCreate.
Syntax
object.DialogCreate(type)
object
Required. The MsiDialogHandler object.
type
Required. The type of the desired dialog.
#$+KDialog Property
	MsiDialogHandler Object	Msi Objects	Database Tables
The MsiDialog object corresponding to the name. Read only.
Syntax
object.Dialog(name)
object
Required. The MsiDialogHandler object.
name
Required. The string representing the dialog.
#$+KDialogFromWindow Property
	MsiDialogHandler Object	Msi Objects	Database Tables
The MsiDialog object corresponding to the passed window reference. Read only.
Syntax
object.DialogFromWindow(window)
object
Required. The MsiDialogHandler object.
window
Required. WIN: The HWND of the window associated with the dialog. MAC: The WindowPtr of the window associated with the dialog.
#$+KAddDialog Method
	MsiDialogHandler Object	Msi Objects	Database Tables
Adds a dialog to the handler internal tables. It also initializes the dialog with the data provided in the record and in the pointers.
Syntax
object.AddDialog(dialog, parent, record, controleventtable, controlconditiontable, eventmappingtable)
object
Required. The MsiDialogHandler object.
dialog
Required. Pointer to the previously created blank dialog.
parent
Pointer to the parent dialog. Can be null.
record
Record of data used to initialize the dialog. Required.The fields of the record correspond to the columns of the Dialog Table in the same order.

controleventtable
Pointer to the ControlEvent table. Can be null.
controlconditiontabel
Pointer to the ControlCondition table. Can be null.
eventmappingtable
Pointer to the EventMapping table. Can be null.
#$+KRemoveDialog Method
	MsiDialogHandler Object	Msi Objects	Database Tables
Removes a dialog from the handler internal tables. It also destroys the window and the object corresponding to the dialog.
Syntax
object.RemoveDialog(dialog)
object
Required. The MsiDialogHandler object.
dialog
Required. Pointer to the dialog to be removed.
#$K+MsiDialog Object
	Msi Objects	Database Tables
MsiDialog is the interface of the dialog object visible to the handler. 
Properties
Control
Handler
IntegerValue
StringValue

Methods
AddControl
Attribute
ControlCreate
EventAction
Execute
FinishCreate
HandleEvent
PropertyChanged
RemoveControl
Reset
Visible

#$+KDatabase Property
	MsiDialog Object	Msi Objects	Database Tables
The MsiControl object corresponding to the name. Read only.
Syntax
object.Control(name)
object
Required. The MsiDialog object.
name
Required. The string representing the control.
#$+KDatabase Property
	MsiDialog Object	Msi Objects	Database Tables
The string value of the dialog. Read only.
Syntax
object.StringValue
object
Required. The MsiDialog object.
#$+KDatabase Property
	MsiDialog Object	Msi Objects	Database Tables
The integer value of the dialog. Read only.
Syntax
object.IntegerValue
object
Required. The MsiDialog object.
#$+KVisible Method
	MsiDialog Object	Msi Objects	Database Tables
Depending on the argument, shows or hides the dialog.
Syntax
object.Visible = show
object
Required. The MsiDialog object.
show
Required. A Boolean value showing whether to show or hide the dialog. True means show, False means hide.
#$+KControlCreate Method
	MsiDialog Object	Msi Objects	Database Tables
Creates a blank, uninitialized control of the named type.
Syntax
object.ControlCreate(type)
object
Required. The MsiDialog object.
type
Required. The name of the control type. The author can specify a type that does not appear in the above list if there is code for such a custom control.
#$+KAttribute Method
	MsiDialog Object	Msi Objects	Database Tables
A general method allowing to get or set the value of some attributes of the dialog.
Syntax
object.Attribute(set, attributename, record)
object
Required. The MsiDialog object.
set
Required. A Boolean value showing whether to set or get the value of the named attribute. True means set, False means get.
attributename
The name of the attribute to be set or get. 
record
Required. The record to be filled in in case of get, or the record of the values to be set. The record contains one field, except in the cases noted in the above table.
#$+KAddControl Method
	MsiDialog Object	Msi Objects	Database Tables
Adds a control to the dialog internal tables. It also initializes the control with the data provided in the record. For compatibility with older scripts, if the control is NULL, it is equivalent to calling the FinishCreate method. At least one non-null control has to be added to the dialog, before FinishCreate is called. 
Syntax
object.AddControl(control, record)
object
Required. The MsiDialog object.
control
Required. The pointer to the previously created blank control, or NULL.
record
Required. The data used at the initialization of the control. The fields are as follows:
Name of the control
Type
X coordinate
Y coordinate
Widht
Height
Attributes
Property associated with the control
Text
Next control in the tab order
Help string
These fields correspond to those of the Control Table.

#$+KFinishCreate Method
	MsiDialog Object	Msi Objects	Database Tables
Signals to the dialog that we are done adding controls, it can resolve the next pointers. At least one non-null control has to be added to the dialog, before this method is called. This method has to be called before any other method can be used on the dialog. 
Syntax
object.FinishCreate
object
Required. The MsiDialog object.
#$+KRemoveControl Method
	MsiDialog Object	Msi Objects	Database Tables
Removes a control from the dialog internal tables. It does not change the permanent tables! If some change is needed in those, than you have to do it yourself! Also it does not check if the removed control was the default button.  
Syntax
object.RemoveControl(control)
object
Required. The MsiDialog object.
control
Required. The pointer to the previously created control.
#$+KExecute Method
	MsiDialog Object	Msi Objects	Database Tables
Runs a modal dialog. It makes the dialog visible, then waits in the message loop to perform the user's commands. Returns a record showing the exit status of the dialog.	This method should not be called on a modeless dialog.
Syntax
object.Execute
object
Required. The MsiDialog object.
#$+KReset Method
	MsiDialog Object	Msi Objects	Database Tables
Resets the dialog. It instructs all the controls to restore the original value of the properties they have changed.
Syntax
object.Reset
object
Required. The MsiDialog object.
#$+KDatabase Property
	MsiDialog Object	Msi Objects	Database Tables
The MsiHandler object used by the dialog. Read only.
Syntax
object.Handler
object
Required. The MsiDialog object.
#$+KEventAction Method
	MsiDialog Object	Msi Objects	Database Tables
It finds all the subscribers of the named event and performs the given action on them.
Syntax
object.EventAction(eventname, action)
object
Required. The MsiDialog object.
eventname
Required. The name of the event whose subscribers have to be found.
action
Required. The action to be performed on the subscribers of the event.
#$+KHandleEvent Method
	MsiDialog Object	Msi Objects	Database Tables
This method triggers a control event. For example when a button is pushed that has to start an event, it uses this method to notify the publisher of the event.
Syntax
object.HandleEvent(eventname, argument)
object
Required. The MsiDialog object.
eventname
Required. The name of the event.
argument
Required. The argument of the event.
#$+KPropertyChanged Method
	MsiDialog Object	Msi Objects	Database Tables
This method is called when a control changes a property value. The method scans the ControlCondition table to see if some action must be taken in response to this change.
Syntax
object.PropertyChanged(property, control)
object
Required. The MsiDialog object.
property
The name of the property whose value has changed. Can be null.
control
The name of the control that reports the change. Can be null. This is used to avoid a control being called in response to its own change.
#$K+MsiEvent Object
	Msi Objects	Database Tables
MsiEvent is the interface of the dialog object visible to the controls. 
Properties
Control
Engine
Handler
IntegerValue
StringValue

Methods
Attribute
ControlActivated
EventAction
HandleEvent
PropertyChanged
PublishEvent
ReadyToChangeFocus
RegisterControlEvent
SetFocus

#$+KDatabase Property
	MsiEvent Object	Msi Objects	Database Tables
The MsiControl object corresponding to the name. Read only.
Syntax
object.Control(name)
object
Required. The MsiEvent object.
name
Required. The string representing the control.
#$+KEngine Property
	MsiEvent Object	Msi Objects	Database Tables
The MsiEngine object used by the event.  Read only.
Syntax
object.Engine
object
Required. The MsiEvent object.
#$+KDatabase Property
	MsiEvent Object	Msi Objects	Database Tables
The string value of the event. Read only.
Syntax
object.StringValue
object
Required. The MsiEvent object.
#$+KDatabase Property
	MsiEvent Object	Msi Objects	Database Tables
The integer value of the event. Read only.
Syntax
object.IntegerValue
object
Required. The MsiEvent object.
#$+KDatabase Property
	MsiEvent Object	Msi Objects	Database Tables
The MsiHandler object used by the dialog. Read only.
Syntax
object.Handler
object
Required. The MsiEvent object.
#$+KPropertyChanged Method
	MsiEvent Object	Msi Objects	Database Tables
This method is called when a control changes a property value. The method scans the ControlCondition table to see if some action must be taken in response to this change.
Syntax
object.PropertyChanged(property, control)
object
Required. The MsiEvent object.
property
The name of the property whose value has changed. Can be null.
control
The name of the control that reports the change. Can be null. This is used to avoid a control being called in response to its own change.
#$+KControlActivated Method
	MsiEvent Object	Msi Objects	Database Tables
This method is called when a control is activated (e.g. a button is pushed). The method scans the ControlEvent table to see if some event is triggered by this control. If an event is found, the argument is formatted using FormatText.
Syntax
object.ControlActivated(control)
object
Required. The MsiEvent object.
control
The name of the control that was actived.
#$+KRegisterControlEvent Method
	MsiEvent Object	Msi Objects	Database Tables
This method is called by a control to register/unregister as a publisher of some event.
Syntax
object.RegisterControlEvent(control, toregister, event)
object
Required. The MsiEvent object.
control
The name of the control registering/unregistering.
toregister
A Boolean value showing whether the control is registering or unregistering.
event
The name of the event.
#$+KHandleEvent Method
	MsiEvent Object	Msi Objects	Database Tables
This method triggers a control event. For example when a button is pushed that has to start an event, it uses this method to notify the publisher of the event.
Syntax
object.HandleEvent(eventname, argument)
object
Required. The MsiEvent object.
eventname
Required. The name of the event.
argument
Required. The argument of the event.
#$+KEscape Method
	MsiEvent Object	Msi Objects	Database Tables
This method is called when the Escape key or the close button is hit on a dialog. The method pushes the designated default button. (see Dialog Table)
Syntax
object.Escape
object
Required. The MsiEvent object.
#$+KPublishEvent Method
	MsiEvent Object	Msi Objects	Database Tables
Finds all the subscribers of an event and notifies them that the event was published.
Syntax
object.PublishEvent(eventname, argument)
object
Required. The MsiEvent object.
eventname
Required. The name of the event whose subscribers have to be found.
argument
Required. A record representing the argument of the event.
#$+KAttribute Method
	MsiEvent Object	Msi Objects	Database Tables
A general method allowing to get or set the value of some attributes of the dialog.
Syntax
object.Attribute(set, attributename, record)
object
Required. The MsiEvent object.
set
Required. A Boolean value showing whether to set or get the value of the named attribute. True means set, False means get.
attributename
The name of the attribute to be set or get. 
record
Required. The record to be filled in in case of get, or the record of the values to be set. The record contains one field, except in the cases noted in the above table.
#$+KEventAction Method
	MsiEvent Object	Msi Objects	Database Tables
It finds all the subscribers of the named event and performs the given action on them.
Syntax
object.EventAction(eventname, action)
object
Required. The MsiEvent object.
eventname
Required. The name of the event whose subscribers have to be found.
action
Required. The action to be performed on the subscribers of the event.
#$+KSetFocus Method
	MsiEvent Object	Msi Objects	Database Tables
Sets the focus to the named control.
Syntax
object.SetFocus(control)
object
Required. The MsiEvent object.
control
Required. The name of the control receiving focus.
#$+KReadyToChangeFocus Method
	MsiEvent Object	Msi Objects	Database Tables
Returns a boolean indicating if the control presently having focus is willing to give it up.
Syntax
object.ReadyToChangeFocus
object
Required. The MsiEvent object.
#$K+MsiControl Object
	Msi Objects	Database Tables
MsiControl is the general interface of the control objects. 
Properties
CanTakeFocus
Dialog
IntegerValue
StringValue

Methods
Attribute
GetIndirectPropertyFromDatabase
GetPropertyFromDatabase
HandleEvent
ReadyToLooseFocus
SetFocus
SetPropertyInDatabase
Undo
WindowMessage

#$+KDialog Property
	MsiControl Object	Msi Objects	Database Tables
The MsiEvent interface of the dialog used by the control. Read only.
Syntax
object.Dialog
object
Required. The MsiControl object.
#$+KDatabase Property
	MsiControl Object	Msi Objects	Database Tables
The string value of the control. Read only.
Syntax
object.StringValue
object
Required. The MsiControl object.
#$+KDatabase Property
	MsiControl Object	Msi Objects	Database Tables
The integer value of the control. Read only.
Syntax
object.IntegerValue
object
Required. The MsiControl object.
#$+KCanTakeFocus Property
	MsiControl Object	Msi Objects	Database Tables
A Boolean value showing whether the control can take focus. This value is platform dependent! It can return different values depending on the operating system. Read only.
Syntax
object.CanTakeFocus
object
Required. The MsiControl object.
#$+KAttribute Method
	MsiControl Object	Msi Objects	Database Tables
A general method allowing to get or set the value of some attributes of the control.
Syntax
object.Attribute(set, attributename, record)
object
Required. The MsiEvent object.
set
Required. A Boolean value showing whether to set or get the value of the named attribute. True means set, False means get.
attributename
The name of the attribute to be set or get. 
record
Required. The record to be filled in in case of get, or the record of the values to be set. The record contains one field, except in the cases noted in the above table.
#$+KHandleEvent Method
	MsiControl Object	Msi Objects	Database Tables
Notifies the publisher of an event that the event has taken place.
Syntax
object.HandleEvent(eventname, argument)
object
Required. The MsiControl object.
eventname
Required. The name of the event.
argument
The argument of the event.
#$+KUndo Method
	MsiControl Object	Msi Objects	Database Tables
This method is called when the dialog is reset. It resets the property associated with the control to its original value.
Syntax
object.Undo
object
Required. The MsiControl object.
#$+KSetPropertyInDatabase Method
	MsiControl Object	Msi Objects	Database Tables
Sets the value of the associated property in the database.
Syntax
object.SetPropertyInDatabase
object
Required. The MsiControl object.
#$+KGetPropertyFromDatabase Method
	MsiControl Object	Msi Objects	Database Tables
Gets the value of the associated property from the database. If the control is not an active control, this method does nothing.
Syntax
object.GetPropertyFromDatabase
object
Required. The MsiControl object.
#$+KGetIndirectPropertyFromDatabase Method
	MsiControl Object	Msi Objects	Database Tables
Gets the value of the associated indirect property from the database. If the control is not an active control or of it is not tied to an indirect property, this method does nothing. 
An indirect property means that the name given points to the name of an other property and the value of this second property is displayed/changed by the control.
Syntax
object.GetIndirectPropertyFromDatabase
object
Required. The MsiControl object.
#$+KSetFocus Method
	MsiControl Object	Msi Objects	Database Tables
Sets the focus to this control.
Syntax
object.SetFocus
object
Required. The MsiControl object.
#$+KWindowMessage Method
	MsiControl Object	Msi Objects	Database Tables
A general method notifying the object that the corresponding window received a message. The object can decide to perform some activity instead of the system or in addition to the system, or ignore the message.
Syntax
object.WindowMessage(message, wParam, lParam)
object
Required. The MsiControl object.
message
Required. An integer identifying the message type.
wParam
Required. An integer representing the first argument of the message. Can be null, depending on the type of message.
lParam
Required. An integer representing the second argument of the message. Can be null, depending on the type of message.
#$+KReadyToLoseFocus Method
	MsiControl Object	Msi Objects	Database Tables
Returns a boolean indicating if the control is willing to give up focus.
Syntax
object.ReadyToLoseFocus
object
Required. The MsiControl object.
#$K+MsiFoo Object
	Msi Objects	Database Tables
!!Desciptive text here!!
!!Next paragraph desciptive text here!!
Properties
SomeProperty

Methods
SomeMethod

#$+KSomeMethod Method
	MsiFoo Object	Msi Objects	Database Tables
!!Desciption here.!!
Syntax
object.SomeMethod(arg1, arg2)
object
Required. The MsiFoo object.
arg1
Required. !!Description of a required argument.!!
arg2
Optional. !!Description of an optional argument.!!
Remarks
!!Additional notes!! 
#$+KSomeProperty Property
	MsiFoo Object	Msi Objects	Database Tables
!!Desciption here.!!
Syntax
object.SomeProperty
object
Required. The MsiFoo object.
Remarks
!!Additional notes!!