C# Class WixSharp.UI.MsiSession

Generic class that represents runtime properties of the MSI setup session as well as some runtime properties of the product being installed (e.g. CodePage, Caption). It also Simplifies MSI execution and provides automatic responses on the MSI Messages.

Normally MsiSession should be extended top meet the needs of the product (MSI) specific setup.

Inheritance: INotifyPropertyChanged
Afficher le fichier Open project: Eun/WixSharp Class Usage Examples

Méthodes publiques

Свойство Type Description
InUiThread System.Action
ProgressStepDelay int

Méthodes publiques

Méthode Description
EnableLog ( string logFile, MsiInstallLogMode mode = MsiInstallLogMode.Info|MsiInstallLogMode.Progress|MsiInstallLogMode.PropertyDump|MsiInstallLogMode.Error|MsiInstallLogMode.User|MsiInstallLogMode.ActionData ) : void

Enables the MSI runtime logging to the specified log file.

Execute ( string msiFile, string msiParams ) : void

Executes the MSI file with the specified MSI parameters.

ExecuteInstall ( string msiFile, string msiParams = null ) : void

Executes the install sequence from the specified MSI file.

ExecuteUninstall ( string msiFile, string msiParams = null ) : void

Executes the uninstall sequence from the specified MSI file.

NotifyHostOnActionStarted ( ) : void
NotifyHostOnProgress ( ) : void
OnActionData ( string data ) : void

Called when ActionData MSI message is received.

OnError ( string data, bool fatal, MsiInstallMessage relatedMessageType = null ) : void

Called when Error event occurs (MSI Error message is received or an internal error condition triggered).

OnInfo ( string data ) : void

Called when Info MSI message is received.

OnUser ( string data ) : void

Called when User MSI message is received.

OnWarning ( string data ) : void

Called when Warning MSI message is received.

Méthodes protégées

Méthode Description
OnMessage ( string message, MsiInstallMessage messageType ) : int

Called when MSI message is received. It is actual the MSI Message Loop.

OnPropertyChanged ( string propertyName ) : void

Private Methods

Méthode Description
OnExternalUI ( IntPtr context, uint messageType, string message ) : int

Method Details

EnableLog() public méthode

Enables the MSI runtime logging to the specified log file.
public EnableLog ( string logFile, MsiInstallLogMode mode = MsiInstallLogMode.Info|MsiInstallLogMode.Progress|MsiInstallLogMode.PropertyDump|MsiInstallLogMode.Error|MsiInstallLogMode.User|MsiInstallLogMode.ActionData ) : void
logFile string The log file.
mode MsiInstallLogMode The logging mode.
Résultat void

Execute() public méthode

Executes the MSI file with the specified MSI parameters.
public Execute ( string msiFile, string msiParams ) : void
msiFile string The MSI file.
msiParams string The MSI parameters.
Résultat void

ExecuteInstall() public méthode

Executes the install sequence from the specified MSI file.
public ExecuteInstall ( string msiFile, string msiParams = null ) : void
msiFile string The MSI file.
msiParams string The MSI params.
Résultat void

ExecuteUninstall() public méthode

Executes the uninstall sequence from the specified MSI file.
public ExecuteUninstall ( string msiFile, string msiParams = null ) : void
msiFile string The MSI file.
msiParams string The MSI params.
Résultat void

NotifyHostOnActionStarted() public méthode

public NotifyHostOnActionStarted ( ) : void
Résultat void

NotifyHostOnProgress() public méthode

public NotifyHostOnProgress ( ) : void
Résultat void

OnActionData() public méthode

Called when ActionData MSI message is received.
public OnActionData ( string data ) : void
data string The message data.
Résultat void

OnError() public méthode

Called when Error event occurs (MSI Error message is received or an internal error condition triggered).
public OnError ( string data, bool fatal, MsiInstallMessage relatedMessageType = null ) : void
data string The message data.
fatal bool if set to true the error is fatal.
relatedMessageType MsiInstallMessage Type of the related message. Note the error may be associated with the internal /// error condition (e.g. exception is raised).
Résultat void

OnInfo() public méthode

Called when Info MSI message is received.
public OnInfo ( string data ) : void
data string The message data.
Résultat void

OnMessage() protected méthode

Called when MSI message is received. It is actual the MSI Message Loop.
protected OnMessage ( string message, MsiInstallMessage messageType ) : int
message string The message data.
messageType MsiInstallMessage Type of the message.
Résultat int

OnPropertyChanged() protected méthode

protected OnPropertyChanged ( string propertyName ) : void
propertyName string
Résultat void

OnUser() public méthode

Called when User MSI message is received.
public OnUser ( string data ) : void
data string The message data.
Résultat void

OnWarning() public méthode

Called when Warning MSI message is received.
public OnWarning ( string data ) : void
data string The message data.
Résultat void

Property Details

InUiThread public_oe property

The UI thread marshalling delegate. It should be set for the environments where cross-thread calls must be marshalled (e.g. WPF, WinForms). Not needed otherwise (e.g. Console application).
public System.Action InUiThread
Résultat System.Action

ProgressStepDelay public_oe static_oe property

The progress step delay. It is a "for-testing" feature. Set it to positive value (number of milliseconds) to artificially slow down the installation process. The default value is 0.
public static int ProgressStepDelay
Résultat int