blob: 1cb8a69940db961d28335eb2ef53b4624bf5b278 [file] [log] [blame]
Martin v. Löwis5f430742006-05-01 16:12:44 +00001\section{\module{msilib} ---
2 Read and write Microsoft Installer files}
3
4\declaremodule{standard}{msilib}
5 \platform{Windows}
6\modulesynopsis{Creation of Microsoft Installer files, and CAB files.}
7\moduleauthor{Martin v. L\"owis}{martin@v.loewis.de}
8\sectionauthor{Martin v. L\"owis}{martin@v.loewis.de}
9
10\index{msi}
11
12\versionadded{2.5}
13
14The \module{msilib} supports the creation of Microsoft Installer
15(\code{.msi}) files. Because these files often contain an embedded
16``cabinet'' file (\code{.cab}), it also exposes an API to create
17CAB files. Support for reading \code{.cab} files is currently not
18implemented; read support for the \code{.msi} database is possible.
19
20This package aims to provide complete access to all tables in an
21\code{.msi} file, therefore, it is a fairly low-level API. Two
22primary applications of this package are the \module{distutils}
23command \code{bdist_msi}, and the creation of Python installer
24package itself (although that currently uses a different version
25of \code{msilib}).
26
27The package contents can be roughly split into four parts:
28low-level CAB routines, low-level MSI routines, higher-level
29MSI routines, and standard table structures.
30
31\begin{funcdesc}{FCICreate}{cabname, files}
32 Create a new CAB file named \var{cabname}. \var{files} must
33 be a list of tuples, each containing the name of the file on
34 disk, and the name of the file inside the CAB file.
35
36 The files are added to the CAB file in the order they have
37 in the list. All files are added into a single CAB file,
38 using the MSZIP compression algorithm.
39
40 Callbacks to Python for the various steps of MSI creation
41 are currently not exposed.
42\end{funcdesc}
43
44\begin{funcdesc}{UUIDCreate}{}
45 Return the string representation of a new unique identifier.
Andrew M. Kuchlingedbe6572006-05-01 16:30:25 +000046 This wraps the Windows API functions \cfunction{UuidCreate} and
47 \cfunction{UuidToString}.
Martin v. Löwis5f430742006-05-01 16:12:44 +000048\end{funcdesc}
49
50\begin{funcdesc}{OpenDatabase}{path, persist}
51 Return a new database object by calling MsiOpenDatabase.
52 \var{path} is the file name of the
Andrew M. Kuchlingedbe6572006-05-01 16:30:25 +000053 MSI file; \var{persist} can be one of the constants
Martin v. Löwis5f430742006-05-01 16:12:44 +000054 \code{MSIDBOPEN_CREATEDIRECT}, \code{MSIDBOPEN_CREATE},
55 \code{MSIDBOPEN_DIRECT}, \code{MSIDBOPEN_READONLY}, or
56 \code{MSIDBOPEN_TRANSACT}, and may include the flag
57 \code{MSIDBOPEN_PATCHFILE}. See the Microsoft documentation for
58 the meaning of these flags; depending on the flags,
59 an existing database is opened, or a new one created.
60\end{funcdesc}
61
62\begin{funcdesc}{CreateRecord}{count}
Andrew M. Kuchlingedbe6572006-05-01 16:30:25 +000063 Return a new record object by calling \cfunction{MSICreateRecord}.
Martin v. Löwis5f430742006-05-01 16:12:44 +000064 \var{count} is the number of fields of the record.
65\end{funcdesc}
66
67\begin{funcdesc}{init_database}{name, schema, ProductName, ProductCode, ProductVersion, Manufacturer}
68 Create and return a new database \var{name}, initialize it
69 with \var{schema}, and set the properties \var{ProductName},
70 \var{ProductCode}, \var{ProductVersion}, and \var{Manufacturer}.
71
72 \var{schema} must be a module object containing \code{tables} and
73 \code{_Validation_records} attributes; typically,
74 \module{msilib.schema} should be used.
75
76 The database will contain just the schema and the validation
77 records when this function returns.
78\end{funcdesc}
79
80\begin{funcdesc}{add_data}{database, records}
81 Add all \var{records} to \var{database}. \var{records} should
82 be a list of tuples, each one containing all fields of a record
83 according to the schema of the table. For optional fields,
84 \code{None} can be passed.
85
86 Field values can be int or long numbers, strings, or instances
87 of the Binary class.
88\end{funcdesc}
89
90\begin{classdesc}{Binary}{filename}
Andrew M. Kuchlingedbe6572006-05-01 16:30:25 +000091 Represents entries in the Binary table; inserting such
Martin v. Löwis5f430742006-05-01 16:12:44 +000092 an object using \function{add_data} reads the file named
93 \var{filename} into the table.
94\end{classdesc}
95
96\begin{funcdesc}{add_tables}{database, module}
97 Add all table content from \var{module} to \var{database}.
98 \var{module} must contain an attribute \var{tables}
99 listing all tables for which content should be added,
100 and one attribute per table that has the actual content.
101
102 This is typically used to install the sequence
Andrew M. Kuchlingedbe6572006-05-01 16:30:25 +0000103 % XXX unfinished sentence
Martin v. Löwis5f430742006-05-01 16:12:44 +0000104\end{funcdesc}
105
106\begin{funcdesc}{add_stream}{database, name, path}
107 Add the file \var{path} into the \code{_Stream} table
108 of \var{database}, with the stream name \var{name}.
109\end{funcdesc}
110
111\begin{funcdesc}{gen_uuid}{}
112 Return a new UUID, in the format that MSI typically
113 requires (i.e. in curly braces, and with all hexdigits
114 in upper-case).
115\end{funcdesc}
116
117\begin{seealso}
118 \seetitle[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/devnotes/winprog/fcicreate.asp]{FCICreateFile}{}
119 \seetitle[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rpc/rpc/uuidcreate.asp]{UuidCreate}{}
120 \seetitle[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rpc/rpc/uuidtostring.asp]{UuidToString}{}
121\end{seealso}
122
123\subsection{Database Objects\label{database-objects}}
124
125\begin{methoddesc}{OpenView}{sql}
Andrew M. Kuchlingedbe6572006-05-01 16:30:25 +0000126 Return a view object, by calling \cfunction{MSIDatabaseOpenView}.
Martin v. Löwis5f430742006-05-01 16:12:44 +0000127 \var{sql} is the SQL statement to execute.
128\end{methoddesc}
129
130\begin{methoddesc}{Commit}{}
131 Commit the changes pending in the current transaction,
Andrew M. Kuchlingedbe6572006-05-01 16:30:25 +0000132 by calling \cfunction{MSIDatabaseCommit}.
Martin v. Löwis5f430742006-05-01 16:12:44 +0000133\end{methoddesc}
134
135\begin{methoddesc}{GetSummaryInformation}{count}
136 Return a new summary information object, by calling
Andrew M. Kuchlingedbe6572006-05-01 16:30:25 +0000137 \cfunction{MsiGetSummaryInformation}. \var{count} is the maximum number of
Martin v. Löwis5f430742006-05-01 16:12:44 +0000138 updated values.
139\end{methoddesc}
140
141\begin{seealso}
142 \seetitle[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msiopenview.asp]{MSIOpenView}{}
143 \seetitle[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msidatabasecommit.asp]{MSIDatabaseCommit}{}
144 \seetitle[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msigetsummaryinformation.asp]{MSIGetSummaryInformation}{}
145\end{seealso}
146
147\subsection{View Objects\label{view-objects}}
148
149\begin{methoddesc}{Execute}{\optional{params=None}}
Andrew M. Kuchlingedbe6572006-05-01 16:30:25 +0000150 Execute the SQL query of the view, through \cfunction{MSIViewExecute}.
Martin v. Löwis5f430742006-05-01 16:12:44 +0000151 \var{params} is an optional record describing actual values
152 of the parameter tokens in the query.
153\end{methoddesc}
154
155\begin{methoddesc}{GetColumnInfo}{kind}
156 Return a record describing the columns of the view, through
Andrew M. Kuchlingedbe6572006-05-01 16:30:25 +0000157 calling \cfunction{MsiViewGetColumnInfo}. \var{kind} can be either
158 \code{MSICOLINFO_NAMES} or \code{MSICOLINFO_TYPES}.
Martin v. Löwis5f430742006-05-01 16:12:44 +0000159\end{methoddesc}
160
161\begin{methoddesc}{Fetch}{}
162 Return a result record of the query, through calling
Andrew M. Kuchlingedbe6572006-05-01 16:30:25 +0000163 \cfunction{MsiViewFetch}.
Martin v. Löwis5f430742006-05-01 16:12:44 +0000164\end{methoddesc}
165
166\begin{methoddesc}{Modify}{kind, data}
Andrew M. Kuchlingedbe6572006-05-01 16:30:25 +0000167 Modify the view, by calling \cfunction{MsiViewModify}. \var{kind}
Martin v. Löwis5f430742006-05-01 16:12:44 +0000168 can be one of \code{MSIMODIFY_SEEK}, \code{MSIMODIFY_REFRESH},
169 \code{MSIMODIFY_INSERT}, \code{MSIMODIFY_UPDATE}, \code{MSIMODIFY_ASSIGN},
170 \code{MSIMODIFY_REPLACE}, \code{MSIMODIFY_MERGE}, \code{MSIMODIFY_DELETE},
171 \code{MSIMODIFY_INSERT_TEMPORARY}, \code{MSIMODIFY_VALIDATE},
172 \code{MSIMODIFY_VALIDATE_NEW}, \code{MSIMODIFY_VALIDATE_FIELD}, or
173 \code{MSIMODIFY_VALIDATE_DELETE}.
174
175 \var{data} must be a record describing the new data.
176\end{methoddesc}
177
178\begin{methoddesc}{Close}{}
Andrew M. Kuchlingedbe6572006-05-01 16:30:25 +0000179 Close the view, through \cfunction{MsiViewClose}.
Martin v. Löwis5f430742006-05-01 16:12:44 +0000180\end{methoddesc}
181
182\begin{seealso}
183 \seetitle[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msiviewexecute.asp]{MsiViewExecute}{}
184 \seetitle[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msiviewgetcolumninfo.asp]{MSIViewGetColumnInfo}{}
185 \seetitle[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msiviewfetch.asp]{MsiViewFetch}{}
186 \seetitle[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msiviewmodify.asp]{MsiViewModify}{}
187 \seetitle[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msiviewclose.asp]{MsiViewClose}{}
188\end{seealso}
189
190\subsection{Summary Information Objects\label{summary-objects}}
191
192\begin{methoddesc}{GetProperty}{field}
Andrew M. Kuchlingedbe6572006-05-01 16:30:25 +0000193 Return a property of the summary, through \cfunction{MsiSummaryInfoGetProperty}.
Martin v. Löwis5f430742006-05-01 16:12:44 +0000194 \var{field} is the name of the property, and can be one of the
195 constants
196 \code{PID_CODEPAGE}, \code{PID_TITLE}, \code{PID_SUBJECT},
197 \code{PID_AUTHOR}, \code{PID_KEYWORDS}, \code{PID_COMMENTS},
198 \code{PID_TEMPLATE}, \code{PID_LASTAUTHOR}, \code{PID_REVNUMBER},
199 \code{PID_LASTPRINTED}, \code{PID_CREATE_DTM}, \code{PID_LASTSAVE_DTM},
200 \code{PID_PAGECOUNT}, \code{PID_WORDCOUNT}, \code{PID_CHARCOUNT},
201 \code{PID_APPNAME}, or \code{PID_SECURITY}.
202\end{methoddesc}
203
204\begin{methoddesc}{GetPropertyCount}{}
205 Return the number of summary properties, through
Andrew M. Kuchlingedbe6572006-05-01 16:30:25 +0000206 \cfunction{MsiSummaryInfoGetPropertyCount}.
Martin v. Löwis5f430742006-05-01 16:12:44 +0000207\end{methoddesc}
208
209\begin{methoddesc}{SetProperty}{field, value}
Andrew M. Kuchlingedbe6572006-05-01 16:30:25 +0000210 Set a property through \cfunction{MsiSummaryInfoSetProperty}. \var{field}
Martin v. Löwis5f430742006-05-01 16:12:44 +0000211 can have the same values as in \method{GetProperty}, \var{value}
212 is the new value of the property. Possible value types are integer
213 and string.
214\end{methoddesc}
215
216\begin{methoddesc}{Persist}{}
217 Write the modified properties to the summary information stream,
Andrew M. Kuchlingedbe6572006-05-01 16:30:25 +0000218 using \cfunction{MsiSummaryInfoPersist}.
Martin v. Löwis5f430742006-05-01 16:12:44 +0000219\end{methoddesc}
220
221\begin{seealso}
222 \seetitle[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msisummaryinfogetproperty.asp]{MsiSummaryInfoGetProperty}{}
223 \seetitle[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msisummaryinfogetpropertycount.asp]{MsiSummaryInfoGetPropertyCount}{}
224 \seetitle[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msisummaryinfosetproperty.asp]{MsiSummaryInfoSetProperty}{}
225 \seetitle[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msisummaryinfopersist.asp]{MsiSummaryInfoPersist}{}
226\end{seealso}
227
228\subsection{Record Objects\label{record-objects}}
229
230\begin{methoddesc}{GetFieldCount}{}
Andrew M. Kuchlingedbe6572006-05-01 16:30:25 +0000231 Return the number of fields of the record, through \cfunction{MsiRecordGetFieldCount}.
Martin v. Löwis5f430742006-05-01 16:12:44 +0000232\end{methoddesc}
233
234\begin{methoddesc}{SetString}{field, value}
Andrew M. Kuchlingedbe6572006-05-01 16:30:25 +0000235 Set \var{field} to \var{value} through \cfunction{MsiRecordSetString}.
Martin v. Löwis5f430742006-05-01 16:12:44 +0000236 \var{field} must be an integer; \var{value} a string.
237\end{methoddesc}
238
239\begin{methoddesc}{SetStream}{field, value}
240 Set \var{field} to the contents of the file named \var{value},
Andrew M. Kuchlingedbe6572006-05-01 16:30:25 +0000241 through \cfunction{MsiRecordSetStream}.
Martin v. Löwis5f430742006-05-01 16:12:44 +0000242 \var{field} must be an integer; \var{value} a string.
243\end{methoddesc}
244
245\begin{methoddesc}{SetInteger}{field, value}
Andrew M. Kuchlingedbe6572006-05-01 16:30:25 +0000246 Set \var{field} to \var{value} through \cfunction{MsiRecordSetInteger}.
247 Both \var{field} and \var{value} must be an integer.
Martin v. Löwis5f430742006-05-01 16:12:44 +0000248\end{methoddesc}
249
250\begin{methoddesc}{ClearData}{}
Andrew M. Kuchlingedbe6572006-05-01 16:30:25 +0000251 Set all fields of the record to 0, through \cfunction{MsiRecordClearData}.
Martin v. Löwis5f430742006-05-01 16:12:44 +0000252\end{methoddesc}
253
254\begin{seealso}
255 \seetitle[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msirecordgetfieldcount.asp]{MsiRecordGetFieldCount}{}
256 \seetitle[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msirecordsetstring.asp]{MsiRecordSetString}{}
257 \seetitle[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msirecordsetstream.asp]{MsiRecordSetStream}{}
258 \seetitle[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msirecordsetinteger.asp]{MsiRecordSetInteger}{}
259 \seetitle[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msirecordclear.asp]{MsiRecordClear}{}
260\end{seealso}
261
262\subsection{Errors\label{msi-errors}}
263
264All wrappers around MSI functions raise \exception{MsiError};
265the string inside the exception will contain more detail.
266
267\subsection{CAB Objects\label{cab}}
268
269\begin{classdesc}{CAB}{name}
270 The class \class{CAB} represents a CAB file. During MSI construction,
271 files will be added simultaneously to the \code{Files} table, and
272 to a CAB file. Then, when all files have been added, the CAB file
273 can be written, then added to the MSI file.
274
275 \var{name} is the name of the CAB file in the MSI file.
276\end{classdesc}
277
278\begin{methoddesc}[CAB]{append}{full, logical}
279 Add the file with the pathname \var{full} to the CAB file,
280 under the name \var{logical}. If there is already a file
281 named \var{logical}, a new file name is created.
282
283 Return the index of the file in the CAB file, and the
284 new name of the file inside the CAB file.
285\end{methoddesc}
286
287\begin{methoddesc}[CAB]{append}{database}
288 Generate a CAB file, add it as a stream to the MSI file,
289 put it into the \code{Media} table, and remove the generated
290 file from the disk.
291\end{methoddesc}
292
293\subsection{Directory Objects\label{msi-directory}}
294
295\begin{classdesc}{Directory}{database, cab, basedir, physical,
296 logical, default, component, \optional{flags}}
297 Create a new directory in the Directory table. There is a current
298 component at each point in time for the directory, which is either
Andrew M. Kuchling4bbf66e2006-05-01 17:06:54 +0000299 explicitly created through \method{start_component}, or implicitly when files
Martin v. Löwis5f430742006-05-01 16:12:44 +0000300 are added for the first time. Files are added into the current
301 component, and into the cab file. To create a directory, a base
Andrew M. Kuchlingedbe6572006-05-01 16:30:25 +0000302 directory object needs to be specified (can be \code{None}), the path to
303 the physical directory, and a logical directory name. \var{default}
Martin v. Löwis5f430742006-05-01 16:12:44 +0000304 specifies the DefaultDir slot in the directory table. componentflags
305 specifies the default flags that new components get.
Andrew M. Kuchlingedbe6572006-05-01 16:30:25 +0000306 % XXX signature says 'component', 'flags'; text says 'componentflags'.
Martin v. Löwis5f430742006-05-01 16:12:44 +0000307\end{classdesc}
308
309\begin{methoddesc}[Directory]{start_component}{\optional{component\optional{,
310 feature\optional{, flags\optional{, keyfile\optional{, uuid}}}}}}
311 Add an entry to the Component table, and make this component the
Andrew M. Kuchling4bbf66e2006-05-01 17:06:54 +0000312 current component for this directory. If no component name is given, the
313 directory name is used. If no \var{feature} is given, the current feature
314 is used. If no \var{flags} are given, the directory's default flags are
315 used. If no \var{keyfile} is given, the KeyPath is left null in the
Martin v. Löwis5f430742006-05-01 16:12:44 +0000316 Component table.
317\end{methoddesc}
318
319\begin{methoddesc}[Directory]{add_file}{file\optional{, src\optional{,
320 version\optional{, language}}}}
321 Add a file to the current component of the directory, starting a new
Andrew M. Kuchling4bbf66e2006-05-01 17:06:54 +0000322 one if there is no current component. By default, the file name
323 in the source and the file table will be identical. If the \var{src} file
Martin v. Löwis5f430742006-05-01 16:12:44 +0000324 is specified, it is interpreted relative to the current
Andrew M. Kuchling4bbf66e2006-05-01 17:06:54 +0000325 directory. Optionally, a \var{version} and a \var{language} can be specified for
Martin v. Löwis5f430742006-05-01 16:12:44 +0000326 the entry in the File table.
327\end{methoddesc}
328
329\begin{methoddesc}[Directory]{glob}{pattern\optional{, exclude}}
330 Add a list of files to the current component as specified in the glob
Andrew M. Kuchling4bbf66e2006-05-01 17:06:54 +0000331 pattern. Individual files can be excluded in the \var{exclude} list.
Martin v. Löwis5f430742006-05-01 16:12:44 +0000332\end{methoddesc}
333
334\begin{methoddesc}[Directory]{remove_pyc}{}
Andrew M. Kuchling4bbf66e2006-05-01 17:06:54 +0000335 Remove \code{.pyc}/\code{.pyo} files on uninstall.
Martin v. Löwis5f430742006-05-01 16:12:44 +0000336\end{methoddesc}
337
338\begin{seealso}
339 \seetitle[http://msdn.microsoft.com/library/en-us/msi/setup/directory_table.asp]{Directory Table}{}
340 \seetitle[http://msdn.microsoft.com/library/en-us/msi/setup/file_table.asp]{File Table}{}
341 \seetitle[http://msdn.microsoft.com/library/en-us/msi/setup/component_table.asp]{Component Table}{}
342 \seetitle[http://msdn.microsoft.com/library/en-us/msi/setup/featurecomponents_table.asp]{FeatureComponents Table}{}
343\end{seealso}
344
345
346\subsection{Features\label{features}}
347
348\begin{classdesc}{Feature}{database, id, title, desc, display\optional{,
349 level=1\optional{, parent\optional\{, directory\optional{,
350 attributes=0}}}}
351
352 Add a new record to the \code{Feature} table, using the values
353 \var{id}, \var{parent.id}, \var{title}, \var{desc}, \var{display},
354 \var{level}, \var{directory}, and \var{attributes}. The resulting
355 feature object can be passed to the \method{start_component} method
356 of \class{Directory}.
357\end{classdesc}
358
359\begin{methoddesc}[Feature]{set_current}{}
360 Make this feature the current feature of \module{msilib}.
361 New components are automatically added to the default feature,
362 unless a feature is explicitly specified.
363\end{methoddesc}
364
365\begin{seealso}
366 \seetitle[http://msdn.microsoft.com/library/en-us/msi/setup/feature_table.asp]{Feature Table}{}
367\end{seealso}
368
369\subsection{GUI classes\label{msi-gui}}
370
371\module{msilib} provides several classes that wrap the GUI tables in
372an MSI database. However, no standard user interface is provided; use
373\module{bdist_msi} to create MSI files with a user-interface for
374installing Python packages.
375
376\begin{classdesc}{Control}{dlg, name}
377 Base class of the dialog controls. \var{dlg} is the dialog object
378 the control belongs to, and \var{name} is the control's name.
379\end{classdesc}
380
381\begin{methoddesc}[Control]{event}{event, argument\optional{,
382 condition = ``1''\optional{, ordering}}}
383
384 Make an entry into the \code{ControlEvent} table for this control.
385\end{methoddesc}
386
387\begin{methoddesc}[Control]{mapping}{event, attribute}
388 Make an entry into the \code{EventMapping} table for this control.
389\end{methoddesc}
390
391\begin{methoddesc}[Control]{condition}{action, condition}
392 Make an entry into the \code{ControlCondition} table for this control.
393\end{methoddesc}
394
395
396\begin{classdesc}{RadioButtonGroup}{dlg, name, property}
397 Create a radio button control named \var{name}. \var{property}
398 is the installer property that gets set when a radio button
399 is selected.
400\end{classdesc}
401
402\begin{methoddesc}[RadioButtonGroup]{add}{name, x, y, width, height, text
403 \optional{, value}}
404 Add a radio button named \var{name} to the group, at the
405 coordinates \var{x}, \var{y}, \var{width}, \var{height}, and
406 with the label \var{text}. If \var{value} is omitted, it
407 defaults to \var{name}.
408\end{methoddesc}
409
410\begin{classdesc}{Dialog}{db, name, x, y, w, h, attr, title, first,
411 default, cancel}
Andrew M. Kuchling4bbf66e2006-05-01 17:06:54 +0000412 Return a new \class{Dialog} object. An entry in the \code{Dialog} table
Martin v. Löwis5f430742006-05-01 16:12:44 +0000413 is made, with the specified coordinates, dialog attributes, title,
414 name of the first, default, and cancel controls.
415\end{classdesc}
416
417\begin{methoddesc}[Dialog]{control}{name, type, x, y, width, height,
418 attributes, property, text, control_next, help}
Andrew M. Kuchling4bbf66e2006-05-01 17:06:54 +0000419 Return a new \class{Control} object. An entry in the \code{Control} table
Martin v. Löwis5f430742006-05-01 16:12:44 +0000420 is made with the specified parameters.
421
422 This is a generic method; for specific types, specialized methods
423 are provided.
424\end{methoddesc}
425
426
427\begin{methoddesc}[Dialog]{text}{name, x, y, width, height, attributes, text}
428 Add and return a \code{Text} control.
429\end{methoddesc}
430
431\begin{methoddesc}[Dialog]{bitmap}{name, x, y, width, height, text}
432 Add and return a \code{Bitmap} control.
433\end{methoddesc}
434
435\begin{methoddesc}[Dialog]{line}{name, x, y, width, height}
436 Add and return a \code{Line} control.
437\end{methoddesc}
438
439\begin{methoddesc}[Dialog]{pushbutton}{name, x, y, width, height, attributes,
440 text, next_control}
441 Add and return a \code{PushButton} control.
442\end{methoddesc}
443
444\begin{methoddesc}[Dialog]{radiogroup}{name, x, y, width, height,
445 attributes, property, text, next_control}
446 Add and return a \code{RadioButtonGroup} control.
447\end{methoddesc}
448
449\begin{methoddesc}[Dialog]{checkbox}{name, x, y, width, height,
450 attributes, property, text, next_control}
451 Add and return a \code{CheckBox} control.
452\end{methoddesc}
453
454\begin{seealso}
455 \seetitle[http://msdn.microsoft.com/library/en-us/msi/setup/dialog_table.asp]{Dialog Table}{}
456 \seetitle[http://msdn.microsoft.com/library/en-us/msi/setup/control_table.asp]{Control Table}{}
457 \seetitle[http://msdn.microsoft.com/library/en-us/msi/setup/controls.asp]{Control Types}{}
458 \seetitle[http://msdn.microsoft.com/library/en-us/msi/setup/controlcondition_table.asp]{ControlCondition Table}{}
459 \seetitle[http://msdn.microsoft.com/library/en-us/msi/setup/controlevent_table.asp]{ControlEvent Table}{}
460 \seetitle[http://msdn.microsoft.com/library/en-us/msi/setup/eventmapping_table.asp]{EventMapping Table}{}
461 \seetitle[http://msdn.microsoft.com/library/en-us/msi/setup/radiobutton_table.asp]{RadioButton Table}{}
462\end{seealso}
463
464\subsection{Precomputed tables\label{msi-tables}}
465
466\module{msilib} provides a few subpackages that contain
467only schema and table definitions. Currently, these definitions
468are based on MSI version 2.0.
469
470\begin{datadesc}{schema}
471 This is the standard MSI schema for MSI 2.0, with the
472 \var{tables} variable providing a list of table definitions,
473 and \var{_Validation_records} providing the data for
474 MSI validation.
475\end{datadesc}
476
477\begin{datadesc}{sequence}
478 This module contains table contents for the standard sequence
479 tables: \var{AdminExecuteSequence}, \var{AdminUISequence},
480 \var{AdvtExecuteSequence}, \var{InstallExecuteSequence}, and
481 \var{InstallUISequence}.
482\end{datadesc}
483
484\begin{datadesc}{text}
485 This module contains definitions for the UIText and ActionText
486 tables, for the standard installer actions.
487\end{datadesc}