Skip to content

Transaction Class

[MSI 4.5] Handle to a multi-session install transaction.

MethodDescription
Commit()Ends the install transaction and commits all changes to the system belonging to the transaction.
FromHandle(handle, ownsHandle)Creates a new Transaction object from an integer handle.
Join(attributes)Makes the current process the owner of the multi-package installation transaction.
Rollback()Ends the install transaction and undoes changes to the system belonging to the transaction.
PropertyDescription
NameGets the name of the transaction.
EventDescription
OwnerChangedNotifies listeners when the process that owns the transaction changed.

Win32 MSI APIs: MsiBeginTransaction MsiJoinTransaction MsiEndTransaction

WixToolset.Dtf.WindowsInstaller.dll version 5.0.0+41e11442b2ca93e444b60213b5ae99dcbab787d8

Ends the install transaction and commits all changes to the system belonging to the transaction.

public void Commit()

Runs any Commit Custom Actions and commits to the system any changes to Win32 or common language runtime assemblies. Deletes the rollback script, and after using this option, the transaction’s changes can no longer be undone with a Rollback Installation. This method can only be called by the current owner of the transaction. Win32 MSI API: MsiEndTransaction

ExceptionDescription
T:WixToolset.Dtf.WindowsInstaller.InstallerExceptionThe transaction could not be committed.

Creates a new Transaction object from an integer handle.

public static Transaction FromHandle(
IntPtr handle,
bool ownsHandle
)
ParameterTypeDescription
handleIntPtrInteger transaction handle
ownsHandlebooltrue to close the handle when this object is disposed

Makes the current process the owner of the multi-package installation transaction.

public void Join(
TransactionAttributes attributes
)
ParameterTypeDescription
attributesTransactionAttributesSelect optional behavior when joining the transaction.

Win32 MSI API: MsiJoinTransaction

ExceptionDescription
T:WixToolset.Dtf.WindowsInstaller.InvalidHandleExceptionThe transaction handle is not valid.
T:WixToolset.Dtf.WindowsInstaller.InstallerExceptionThe transaction could not be joined.

Ends the install transaction and undoes changes to the system belonging to the transaction.

public void Rollback()

This method can only be called by the current owner of the transaction. Win32 MSI API: MsiEndTransaction

ExceptionDescription
T:WixToolset.Dtf.WindowsInstaller.InstallerExceptionThe transaction could not be rolled back.

Gets the name of the transaction.

public string Name { get; set; }

Notifies listeners when the process that owns the transaction changed.

public System.EventHandler<System.EventArgs> OwnerChanged

System.EventHandler<System.EventArgs>