Skip to main content

IEngine Interface

High level abstraction over the «see T:WixToolset.Mba.Core.IBootstrapperEngine» interface.

Methods

MethodDescription
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

PropertyDescription
PackageCountGets the number of packages in the bundle.

WixToolset.Mba.Core.dll version 4.0.5+b9b2f1b4c69a1b509d487dc950b30b4ec9b0d040

Apply(hwndParent) Method

Install the packages.

Declaration

public void Apply(
IntPtr hwndParent
)

Parameters

ParameterTypeDescription
hwndParentIntPtrThe parent window for the installation user interface.

CloseSplashScreen() Method

Close the splash screen if it is still open. Does nothing if the splash screen is not or never was opened.

Declaration

public void CloseSplashScreen()

CompareVersions() Method

Declaration

public int CompareVersions()

Return value

int 0 if equal, 1 if version1 {'>'} version2, -1 if version1 {'<'} version2

ContainsVariable(name) Method

Checks if a variable exists in the engine.

Declaration

public bool ContainsVariable(
string name
)

Parameters

ParameterTypeDescription
namestringThe name of the variable.

Return value

bool Whether the variable exists.

Detect() Method

Determine if all installation conditions are fulfilled.

Declaration

public void Detect()

Detect(hwndParent) Method

Determine if all installation conditions are fulfilled.

Declaration

public void Detect(
IntPtr hwndParent
)

Parameters

ParameterTypeDescription
hwndParentIntPtrThe parent window for the installation user interface.

Elevate(hwndParent) Method

Elevate the install.

Declaration

public bool Elevate(
IntPtr hwndParent
)

Parameters

ParameterTypeDescription
hwndParentIntPtrThe parent window of the elevation dialog.

Return value

bool true if elevation succeeded; otherwise, false if the user cancelled.

Exceptions

ExceptionDescription
T:System.ComponentModel.Win32ExceptionA Win32 error occurred.

EscapeString(input) Method

Escapes the input string.

Declaration

public string EscapeString(
string input
)

Parameters

ParameterTypeDescription
inputstringThe string to escape.

Return value

string The escaped string.

Exceptions

ExceptionDescription
T:System.ComponentModel.Win32ExceptionA Win32 error occurred.

EvaluateCondition(condition) Method

Evaluates the condition string.

Declaration

public bool EvaluateCondition(
string condition
)

Parameters

ParameterTypeDescription
conditionstringThe string representing the condition to evaluate.

Return value

bool Whether the condition evaluated to true or false.

FormatString(format) Method

Formats the input string.

Declaration

public string FormatString(
string format
)

Parameters

ParameterTypeDescription
formatstringThe string to format.

Return value

string The formatted string.

Exceptions

ExceptionDescription
T:System.ComponentModel.Win32ExceptionA Win32 error occurred.

GetRelatedBundleVariable(bundleId, name) Method

Gets persisted variables from a related bundle.

Declaration

public string GetRelatedBundleVariable(
string bundleId,
string name
)

Parameters

ParameterTypeDescription
bundleIdstringThe BundleId of the related bundle.
namestringThe name of the variable.

GetVariableNumeric(name) Method

Gets numeric variables for the engine.

Declaration

public System.Int64 GetVariableNumeric(
string name
)

Parameters

ParameterTypeDescription
namestringThe name of the variable.

GetVariableSecureString(name) Method

Gets string variables for the engine using SecureStrings.

Declaration

public System.Security.SecureString GetVariableSecureString(
string name
)

Parameters

ParameterTypeDescription
namestringThe name of the variable.

GetVariableString(name) Method

Gets string variables for the engine.

Declaration

public string GetVariableString(
string name
)

Parameters

ParameterTypeDescription
namestringThe name of the variable.

GetVariableVersion(name) Method

Gets «see T:System.Version» variables for the engine.

Declaration

public string GetVariableVersion(
string name
)

Parameters

ParameterTypeDescription
namestringThe name of the variable.

LaunchApprovedExe(hwndParent, approvedExeForElevationId, arguments) Method

Launches a preapproved executable elevated. As long as the engine already elevated, there will be no UAC prompt.

Declaration

public void LaunchApprovedExe(
IntPtr hwndParent,
string approvedExeForElevationId,
string arguments
)

Parameters

ParameterTypeDescription
hwndParentIntPtrThe parent window of the elevation dialog (if the engine hasn't elevated yet).
approvedExeForElevationIdstringId of the ApprovedExeForElevation element specified when the bundle was authored.
argumentsstringOptional arguments.

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

public void LaunchApprovedExe(
IntPtr hwndParent,
string approvedExeForElevationId,
string arguments,
int waitForInputIdleTimeout
)

Parameters

ParameterTypeDescription
hwndParentIntPtrThe parent window of the elevation dialog (if the engine hasn't elevated yet).
approvedExeForElevationIdstringId of the ApprovedExeForElevation element specified when the bundle was authored.
argumentsstringOptional arguments.
waitForInputIdleTimeoutintTimeout 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

Logs the message .

Declaration

public void Log(
LogLevel level,
string message
)

Parameters

ParameterTypeDescription
levelLogLevelThe logging level.
messagestringThe message to log.

Plan(action) Method

Determine the installation sequencing and costing.

Declaration

public void Plan(
LaunchAction action
)

Parameters

ParameterTypeDescription
actionLaunchActionThe action to perform when planning.

Quit(exitCode) Method

Shuts down the engine.

Declaration

public void Quit(
int exitCode
)

Parameters

ParameterTypeDescription
exitCodeintExit code indicating reason for shut down.

SendEmbeddedError(errorCode, message, uiHint) Method

Sends error message when embedded.

Declaration

public int SendEmbeddedError(
int errorCode,
string message,
int uiHint
)

Parameters

ParameterTypeDescription
errorCodeintError code.
messagestringError message.
uiHintintUI buttons to show on error dialog.

SendEmbeddedProgress(progressPercentage, overallPercentage) Method

Sends progress percentages when embedded.

Declaration

public int SendEmbeddedProgress(
int progressPercentage,
int overallPercentage
)

Parameters

ParameterTypeDescription
progressPercentageintPercentage completed thus far.
overallPercentageintOverall percentage completed.

SetDownloadSource(packageOrContainerId, payloadId, url, user, password) Method

Set the new download URL for a package or container.

Declaration

public void SetDownloadSource(
string packageOrContainerId,
string payloadId,
string url,
string user,
string password
)

Parameters

ParameterTypeDescription
packageOrContainerIdstringThe id that uniquely identifies the package or container.
payloadIdstringThe id that uniquely identifies the payload.
urlstringThe new url.
userstringThe user name for proxy authentication.
passwordstringThe password for proxy authentication.

SetLocalSource(packageOrContainerId, payloadId, path) Method

Set the local source for a package or container.

Declaration

public void SetLocalSource(
string packageOrContainerId,
string payloadId,
string path
)

Parameters

ParameterTypeDescription
packageOrContainerIdstringThe id that uniquely identifies the package or container.
payloadIdstringThe id that uniquely identifies the payload.
pathstringThe new source path.

SetUpdate(localSource, downloadSource, size, hashType, hash) Method

Set the update information for a bundle.

Declaration

public void SetUpdate(
string localSource,
string downloadSource,
System.Int64 size,
UpdateHashType hashType,
string hash
)

Parameters

ParameterTypeDescription
localSourcestringOptional local source path for the update. Default is "update[OriginalNameOfBundle].exe".
downloadSourcestringOptional download source for the update.
sizeSystem.Int64Size of the expected update.
hashTypeUpdateHashTypeType of the hash expected on the update.
hashstringOptional hash expected for the update.

SetUpdateSource(url) Method

Sets the URL to the update feed.

Declaration

public void SetUpdateSource(
string url
)

Parameters

ParameterTypeDescription
urlstringURL of the update feed.

SetVariableNumeric(name, value) Method

Sets numeric variables for the engine.

Declaration

public void SetVariableNumeric(
string name,
System.Int64 value
)

Parameters

ParameterTypeDescription
namestringThe name of the variable.
valueSystem.Int64The value to set.

SetVariableString(name, value, formatted) Method

Sets string variables for the engine using SecureStrings.

Declaration

public void SetVariableString(
string name,
System.Security.SecureString value,
bool formatted
)

Parameters

ParameterTypeDescription
namestringThe name of the variable.
valueSystem.Security.SecureStringThe value to set.
formattedboolFalse if the value is a literal string.

SetVariableString(name, value, formatted) Method

Sets string variables for the engine.

Declaration

public void SetVariableString(
string name,
string value,
bool formatted
)

Parameters

ParameterTypeDescription
namestringThe name of the variable.
valuestringThe value to set.
formattedboolFalse if the value is a literal string.

SetVariableVersion(name, value) Method

Sets version variables for the engine.

Declaration

public void SetVariableVersion(
string name,
string value
)

Parameters

ParameterTypeDescription
namestringThe name of the variable.
valuestringThe value to set.

PackageCount Property

Gets the number of packages in the bundle.

Declaration

public int PackageCount { get; set; }