Availability: Windows.
New in version 2.5.
The msilib supports the creation of Microsoft Installer
(.msi
) files. Because these files often contain an embedded
``cabinet'' file (.cab
), it also exposes an API to create
CAB files. Support for reading .cab
files is currently not
implemented; read support for the .msi
database is possible.
This package aims to provide complete access to all tables in an
.msi
file, therefore, it is a fairly low-level API. Two
primary applications of this package are the distutils
command bdist_msi
, and the creation of Python installer
package itself (although that currently uses a different version
of msilib
).
The package contents can be roughly split into four parts: low-level CAB routines, low-level MSI routines, higher-level MSI routines, and standard table structures.
The files are added to the CAB file in the order they appear in the list. All files are added into a single CAB file, using the MSZIP compression algorithm.
Callbacks to Python for the various steps of MSI creation are currently not exposed.
MSIDBOPEN_CREATEDIRECT
, MSIDBOPEN_CREATE
,
MSIDBOPEN_DIRECT
, MSIDBOPEN_READONLY
, or
MSIDBOPEN_TRANSACT
, and may include the flag
MSIDBOPEN_PATCHFILE
. See the Microsoft documentation for
the meaning of these flags; depending on the flags,
an existing database is opened, or a new one created.
schema must be a module object containing tables
and
_Validation_records
attributes; typically,
msilib.schema should be used.
The database will contain just the schema and the validation records when this function returns.
None
can be passed.
Field values can be int or long numbers, strings, or instances of the Binary class.
This is typically used to install the sequence tables.
_Stream
table
of database, with the stream name name.