IEngine Interface
High level abstraction over the «see T:WixToolset.Mba.Core.IBootstrapperEngine» interface.
Methods
Section titled “Methods”| Method | Description |
|---|---|
| Apply(hwndParent) | Install the packages. |
| CloseSplashScreen() | Close the splash screen if it is still open. Does nothing if the splash screen is not or never was opened. |
| CompareVersions() | |
| ContainsVariable(name) | Checks if a variable exists in the engine. |
| Detect() | Determine if all installation conditions are fulfilled. |
| Detect(hwndParent) | Determine if all installation conditions are fulfilled. |
| Elevate(hwndParent) | Elevate the install. |
| EscapeString(input) | Escapes the input string. |
| EvaluateCondition(condition) | Evaluates the condition string. |
| FormatString(format) | Formats the input string. |
| GetRelatedBundleVariable(bundleId, name) | Gets persisted variables from a related bundle. |
| GetVariableNumeric(name) | Gets numeric variables for the engine. |
| GetVariableSecureString(name) | Gets string variables for the engine using SecureStrings. |
| GetVariableString(name) | Gets string variables for the engine. |
| GetVariableVersion(name) | Gets «see T:System.Version» variables for the engine. |
| LaunchApprovedExe(hwndParent, approvedExeForElevationId, arguments) | Launches a preapproved executable elevated. As long as the engine already elevated, there will be no UAC prompt. |
| LaunchApprovedExe(hwndParent, approvedExeForElevationId, arguments, waitForInputIdleTimeout) | Launches a preapproved executable elevated. As long as the engine already elevated, there will be no UAC prompt. |
| Log(level, message) | Logs the message . |
| Plan(action) | Determine the installation sequencing and costing. |
| Quit(exitCode) | Shuts down the engine. |
| SendEmbeddedError(errorCode, message, uiHint) | Sends error message when embedded. |
| SendEmbeddedProgress(progressPercentage, overallPercentage) | Sends progress percentages when embedded. |
| SetDownloadSource(packageOrContainerId, payloadId, url, user, password) | Set the new download URL for a package or container. |
| SetLocalSource(packageOrContainerId, payloadId, path) | Set the local source for a package or container. |
| SetUpdate(localSource, downloadSource, size, hashType, hash) | Set the update information for a bundle. |
| SetUpdateSource(url) | Sets the URL to the update feed. |
| SetVariableNumeric(name, value) | Sets numeric variables for the engine. |
| SetVariableString(name, value, formatted) | Sets string variables for the engine using SecureStrings. |
| SetVariableString(name, value, formatted) | Sets string variables for the engine. |
| SetVariableVersion(name, value) | Sets version variables for the engine. |
Properties
Section titled “Properties”| Property | Description |
|---|---|
| PackageCount | Gets the number of packages in the bundle. |
WixToolset.Mba.Core.dll version 4.0.5+b9b2f1b4c69a1b509d487dc950b30b4ec9b0d040 |
Apply(hwndParent) Method
Section titled “Apply(hwndParent) Method”Install the packages.
Declaration
Section titled “Declaration”public void Apply( IntPtr hwndParent)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| hwndParent | IntPtr | The parent window for the installation user interface. |
CloseSplashScreen() Method
Section titled “CloseSplashScreen() Method”Close the splash screen if it is still open. Does nothing if the splash screen is not or never was opened.
Declaration
Section titled “Declaration”public void CloseSplashScreen()CompareVersions() Method
Section titled “CompareVersions() Method”Declaration
Section titled “Declaration”public int CompareVersions()Return value
Section titled “Return value”int 0 if equal, 1 if version1 {’>’} version2, -1 if version1 {’<’} version2
ContainsVariable(name) Method
Section titled “ContainsVariable(name) Method”Checks if a variable exists in the engine.
Declaration
Section titled “Declaration”public bool ContainsVariable( string name)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| name | string | The name of the variable. |
Return value
Section titled “Return value”bool Whether the variable exists.
Detect() Method
Section titled “Detect() Method”Determine if all installation conditions are fulfilled.
Declaration
Section titled “Declaration”public void Detect()Detect(hwndParent) Method
Section titled “Detect(hwndParent) Method”Determine if all installation conditions are fulfilled.
Declaration
Section titled “Declaration”public void Detect( IntPtr hwndParent)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| hwndParent | IntPtr | The parent window for the installation user interface. |
Elevate(hwndParent) Method
Section titled “Elevate(hwndParent) Method”Elevate the install.
Declaration
Section titled “Declaration”public bool Elevate( IntPtr hwndParent)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| hwndParent | IntPtr | The parent window of the elevation dialog. |
Return value
Section titled “Return value”bool true if elevation succeeded; otherwise, false if the user cancelled.
Exceptions
Section titled “Exceptions”| Exception | Description |
|---|---|
| T:System.ComponentModel.Win32Exception | A Win32 error occurred. |
EscapeString(input) Method
Section titled “EscapeString(input) Method”Escapes the input string.
Declaration
Section titled “Declaration”public string EscapeString( string input)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| input | string | The string to escape. |
Return value
Section titled “Return value”string The escaped string.
Exceptions
Section titled “Exceptions”| Exception | Description |
|---|---|
| T:System.ComponentModel.Win32Exception | A Win32 error occurred. |
EvaluateCondition(condition) Method
Section titled “EvaluateCondition(condition) Method”Evaluates the condition string.
Declaration
Section titled “Declaration”public bool EvaluateCondition( string condition)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| condition | string | The string representing the condition to evaluate. |
Return value
Section titled “Return value”bool Whether the condition evaluated to true or false.
FormatString(format) Method
Section titled “FormatString(format) Method”Formats the input string.
Declaration
Section titled “Declaration”public string FormatString( string format)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| format | string | The string to format. |
Return value
Section titled “Return value”string The formatted string.
Exceptions
Section titled “Exceptions”| Exception | Description |
|---|---|
| T:System.ComponentModel.Win32Exception | A Win32 error occurred. |
GetRelatedBundleVariable(bundleId, name) Method
Section titled “GetRelatedBundleVariable(bundleId, name) Method”Gets persisted variables from a related bundle.
Declaration
Section titled “Declaration”public string GetRelatedBundleVariable( string bundleId, string name)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| bundleId | string | The BundleId of the related bundle. |
| name | string | The name of the variable. |
GetVariableNumeric(name) Method
Section titled “GetVariableNumeric(name) Method”Gets numeric variables for the engine.
Declaration
Section titled “Declaration”public System.Int64 GetVariableNumeric( string name)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| name | string | The name of the variable. |
GetVariableSecureString(name) Method
Section titled “GetVariableSecureString(name) Method”Gets string variables for the engine using SecureStrings.
Declaration
Section titled “Declaration”public System.Security.SecureString GetVariableSecureString( string name)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| name | string | The name of the variable. |
GetVariableString(name) Method
Section titled “GetVariableString(name) Method”Gets string variables for the engine.
Declaration
Section titled “Declaration”public string GetVariableString( string name)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| name | string | The name of the variable. |
GetVariableVersion(name) Method
Section titled “GetVariableVersion(name) Method”Gets «see T:System.Version» variables for the engine.
Declaration
Section titled “Declaration”public string GetVariableVersion( string name)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| name | string | The name of the variable. |
LaunchApprovedExe(hwndParent, approvedExeForElevationId, arguments) Method
Section titled “LaunchApprovedExe(hwndParent, approvedExeForElevationId, arguments) Method”Launches a preapproved executable elevated. As long as the engine already elevated, there will be no UAC prompt.
Declaration
Section titled “Declaration”public void LaunchApprovedExe( IntPtr hwndParent, string approvedExeForElevationId, string arguments)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| hwndParent | IntPtr | The parent window of the elevation dialog (if the engine hasn’t elevated yet). |
| approvedExeForElevationId | string | Id of the ApprovedExeForElevation element specified when the bundle was authored. |
| arguments | string | Optional arguments. |
LaunchApprovedExe(hwndParent, approvedExeForElevationId, arguments, waitForInputIdleTimeout) Method
Section titled “LaunchApprovedExe(hwndParent, approvedExeForElevationId, arguments, waitForInputIdleTimeout) Method”Launches a preapproved executable elevated. As long as the engine already elevated, there will be no UAC prompt.
Declaration
Section titled “Declaration”public void LaunchApprovedExe( IntPtr hwndParent, string approvedExeForElevationId, string arguments, int waitForInputIdleTimeout)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| hwndParent | IntPtr | The parent window of the elevation dialog (if the engine hasn’t elevated yet). |
| approvedExeForElevationId | string | Id of the ApprovedExeForElevation element specified when the bundle was authored. |
| arguments | string | Optional arguments. |
| waitForInputIdleTimeout | int | Timeout in milliseconds. When set to something other than zero, the engine will call WaitForInputIdle for the new process with this timeout before calling OnLaunchApprovedExeComplete. |
Log(level, message) Method
Section titled “Log(level, message) Method”Logs the message .
Declaration
Section titled “Declaration”public void Log( LogLevel level, string message)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| level | LogLevel | The logging level. |
| message | string | The message to log. |
Plan(action) Method
Section titled “Plan(action) Method”Determine the installation sequencing and costing.
Declaration
Section titled “Declaration”public void Plan( LaunchAction action)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| action | LaunchAction | The action to perform when planning. |
Quit(exitCode) Method
Section titled “Quit(exitCode) Method”Shuts down the engine.
Declaration
Section titled “Declaration”public void Quit( int exitCode)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| exitCode | int | Exit code indicating reason for shut down. |
SendEmbeddedError(errorCode, message, uiHint) Method
Section titled “SendEmbeddedError(errorCode, message, uiHint) Method”Sends error message when embedded.
Declaration
Section titled “Declaration”public int SendEmbeddedError( int errorCode, string message, int uiHint)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| errorCode | int | Error code. |
| message | string | Error message. |
| uiHint | int | UI buttons to show on error dialog. |
SendEmbeddedProgress(progressPercentage, overallPercentage) Method
Section titled “SendEmbeddedProgress(progressPercentage, overallPercentage) Method”Sends progress percentages when embedded.
Declaration
Section titled “Declaration”public int SendEmbeddedProgress( int progressPercentage, int overallPercentage)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| progressPercentage | int | Percentage completed thus far. |
| overallPercentage | int | Overall percentage completed. |
SetDownloadSource(packageOrContainerId, payloadId, url, user, password) Method
Section titled “SetDownloadSource(packageOrContainerId, payloadId, url, user, password) Method”Set the new download URL for a package or container.
Declaration
Section titled “Declaration”public void SetDownloadSource( string packageOrContainerId, string payloadId, string url, string user, string password)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| packageOrContainerId | string | The id that uniquely identifies the package or container. |
| payloadId | string | The id that uniquely identifies the payload. |
| url | string | The new url. |
| user | string | The user name for proxy authentication. |
| password | string | The password for proxy authentication. |
SetLocalSource(packageOrContainerId, payloadId, path) Method
Section titled “SetLocalSource(packageOrContainerId, payloadId, path) Method”Set the local source for a package or container.
Declaration
Section titled “Declaration”public void SetLocalSource( string packageOrContainerId, string payloadId, string path)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| packageOrContainerId | string | The id that uniquely identifies the package or container. |
| payloadId | string | The id that uniquely identifies the payload. |
| path | string | The new source path. |
SetUpdate(localSource, downloadSource, size, hashType, hash) Method
Section titled “SetUpdate(localSource, downloadSource, size, hashType, hash) Method”Set the update information for a bundle.
Declaration
Section titled “Declaration”public void SetUpdate( string localSource, string downloadSource, System.Int64 size, UpdateHashType hashType, string hash)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| localSource | string | Optional local source path for the update. Default is “update[OriginalNameOfBundle].exe”. |
| downloadSource | string | Optional download source for the update. |
| size | System.Int64 | Size of the expected update. |
| hashType | UpdateHashType | Type of the hash expected on the update. |
| hash | string | Optional hash expected for the update. |
SetUpdateSource(url) Method
Section titled “SetUpdateSource(url) Method”Sets the URL to the update feed.
Declaration
Section titled “Declaration”public void SetUpdateSource( string url)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| url | string | URL of the update feed. |
SetVariableNumeric(name, value) Method
Section titled “SetVariableNumeric(name, value) Method”Sets numeric variables for the engine.
Declaration
Section titled “Declaration”public void SetVariableNumeric( string name, System.Int64 value)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| name | string | The name of the variable. |
| value | System.Int64 | The value to set. |
SetVariableString(name, value, formatted) Method
Section titled “SetVariableString(name, value, formatted) Method”Sets string variables for the engine using SecureStrings.
Declaration
Section titled “Declaration”public void SetVariableString( string name, System.Security.SecureString value, bool formatted)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| name | string | The name of the variable. |
| value | System.Security.SecureString | The value to set. |
| formatted | bool | False if the value is a literal string. |
SetVariableString(name, value, formatted) Method
Section titled “SetVariableString(name, value, formatted) Method”Sets string variables for the engine.
Declaration
Section titled “Declaration”public void SetVariableString( string name, string value, bool formatted)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| name | string | The name of the variable. |
| value | string | The value to set. |
| formatted | bool | False if the value is a literal string. |
SetVariableVersion(name, value) Method
Section titled “SetVariableVersion(name, value) Method”Sets version variables for the engine.
Declaration
Section titled “Declaration”public void SetVariableVersion( string name, string value)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| name | string | The name of the variable. |
| value | string | The value to set. |
PackageCount Property
Section titled “PackageCount Property”Gets the number of packages in the bundle.
Declaration
Section titled “Declaration”public int PackageCount { get; set; }