MsiEndTransaction function (msi.h)
The MsiEndTransaction function can commit or roll back all the installations belonging to the transaction opened by the MsiBeginTransaction function. This function should be called by the current owner of the transaction.
Windows Installer 4.0 and earlier: Not supported. This function is available beginning with Windows Installer 4.5.
Syntax
UINT MsiEndTransaction(
[in] DWORD dwTransactionState
);
Parameters
[in] dwTransactionState
The value of this parameter determines whether the installer commits or rolls back all the installations belonging to the transaction. The value can be one of the following.
Value | Meaning |
---|---|
|
Performs a Rollback Installation to undo changes to the system belonging to the transaction opened by the MsiBeginTransaction function. |
|
Commits all changes to the system belonging to the transaction. 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. |
Return value
The MsiEndTransaction function returns the following values.
Value | Meaning |
---|---|
|
A transaction can be ended only by the current owner. |
|
An installation belonging to the transaction could not be completed. |
|
An installation belonging to the transaction is still in progress. |
|
An installation belonging to the transaction did not complete. During the installation, the DisableRollback action disabled rollback installations of the package. The installer rolls back the installation up to the point where rollback was disabled, and the function returns this error. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Installer 5.0 on Windows Server 2012, Windows 8, Windows Server 2008 R2 or Windows 7. Windows Installer 4.5 on Windows Vista, Windows XP, Windows Server 2003, and Windows Server 2008. See the Windows Installer Run-Time Requirements for information about the minimum Windows service pack that is required by a Windows Installer version. |
Target Platform | Windows |
Header | msi.h |
Library | Msi.lib |
DLL | Msi.dll |