~dkuhlman/python-training-materials/Materials

« back to all changes in this revision

Viewing changes to python-3.5.2-docs-html/library/msilib.html

  • Committer: Dave Kuhlman
  • Date: 2017-04-15 16:24:56 UTC
  • Revision ID: dkuhlman@davekuhlman.org-20170415162456-iav9vozzg4iwqwv3
Updated docs

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 
2
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
3
 
 
4
 
 
5
<html xmlns="http://www.w3.org/1999/xhtml">
 
6
  <head>
 
7
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 
8
    
 
9
    <title>34.1. msilib — Read and write Microsoft Installer files &mdash; Python 3.5.2 documentation</title>
 
10
    
 
11
    <link rel="stylesheet" href="../_static/pydoctheme.css" type="text/css" />
 
12
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
 
13
    
 
14
    <script type="text/javascript">
 
15
      var DOCUMENTATION_OPTIONS = {
 
16
        URL_ROOT:    '../',
 
17
        VERSION:     '3.5.2',
 
18
        COLLAPSE_INDEX: false,
 
19
        FILE_SUFFIX: '.html',
 
20
        HAS_SOURCE:  true
 
21
      };
 
22
    </script>
 
23
    <script type="text/javascript" src="../_static/jquery.js"></script>
 
24
    <script type="text/javascript" src="../_static/underscore.js"></script>
 
25
    <script type="text/javascript" src="../_static/doctools.js"></script>
 
26
    <script type="text/javascript" src="../_static/sidebar.js"></script>
 
27
    <link rel="search" type="application/opensearchdescription+xml"
 
28
          title="Search within Python 3.5.2 documentation"
 
29
          href="../_static/opensearch.xml"/>
 
30
    <link rel="author" title="About these documents" href="../about.html" />
 
31
    <link rel="copyright" title="Copyright" href="../copyright.html" />
 
32
    <link rel="top" title="Python 3.5.2 documentation" href="../contents.html" />
 
33
    <link rel="up" title="34. MS Windows Specific Services" href="windows.html" />
 
34
    <link rel="next" title="34.2. msvcrt – Useful routines from the MS VC++ runtime" href="msvcrt.html" />
 
35
    <link rel="prev" title="34. MS Windows Specific Services" href="windows.html" />
 
36
    <link rel="shortcut icon" type="image/png" href="../_static/py.png" />
 
37
    
 
38
    <script type="text/javascript" src="../_static/copybutton.js"></script>
 
39
    <script type="text/javascript" src="../_static/version_switch.js"></script>
 
40
    
 
41
    
 
42
 
 
43
 
 
44
  </head>
 
45
  <body role="document">  
 
46
    <div class="related" role="navigation" aria-label="related navigation">
 
47
      <h3>Navigation</h3>
 
48
      <ul>
 
49
        <li class="right" style="margin-right: 10px">
 
50
          <a href="../genindex.html" title="General Index"
 
51
             accesskey="I">index</a></li>
 
52
        <li class="right" >
 
53
          <a href="../py-modindex.html" title="Python Module Index"
 
54
             >modules</a> |</li>
 
55
        <li class="right" >
 
56
          <a href="msvcrt.html" title="34.2. msvcrt – Useful routines from the MS VC++ runtime"
 
57
             accesskey="N">next</a> |</li>
 
58
        <li class="right" >
 
59
          <a href="windows.html" title="34. MS Windows Specific Services"
 
60
             accesskey="P">previous</a> |</li>
 
61
        <li><img src="../_static/py.png" alt=""
 
62
                 style="vertical-align: middle; margin-top: -1px"/></li>
 
63
        <li><a href="https://www.python.org/">Python</a> &raquo;</li>
 
64
        <li>
 
65
          <span class="version_switcher_placeholder">3.5.2</span>
 
66
          <a href="../index.html">Documentation </a> &raquo;
 
67
        </li>
 
68
 
 
69
          <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &raquo;</li>
 
70
          <li class="nav-item nav-item-2"><a href="windows.html" accesskey="U">34. MS Windows Specific Services</a> &raquo;</li>
 
71
    <li class="right">
 
72
        
 
73
 
 
74
    <div class="inline-search" style="display: none" role="search">
 
75
        <form class="inline-search" action="../search.html" method="get">
 
76
          <input placeholder="Quick search" type="text" name="q" />
 
77
          <input type="submit" value="Go" />
 
78
          <input type="hidden" name="check_keywords" value="yes" />
 
79
          <input type="hidden" name="area" value="default" />
 
80
        </form>
 
81
    </div>
 
82
    <script type="text/javascript">$('.inline-search').show(0);</script>
 
83
         |
 
84
    </li>
 
85
 
 
86
      </ul>
 
87
    </div>    
 
88
 
 
89
    <div class="document">
 
90
      <div class="documentwrapper">
 
91
        <div class="bodywrapper">
 
92
          <div class="body" role="main">
 
93
            
 
94
  <div class="section" id="module-msilib">
 
95
<span id="msilib-read-and-write-microsoft-installer-files"></span><h1>34.1. <a class="reference internal" href="#module-msilib" title="msilib: Creation of Microsoft Installer files, and CAB files. (Windows)"><code class="xref py py-mod docutils literal"><span class="pre">msilib</span></code></a> &#8212; Read and write Microsoft Installer files<a class="headerlink" href="#module-msilib" title="Permalink to this headline">¶</a></h1>
 
96
<p><strong>Source code:</strong> <a class="reference external" href="https://hg.python.org/cpython/file/3.5/Lib/msilib/__init__.py">Lib/msilib/__init__.py</a></p>
 
97
<hr class="docutils" id="index-0" />
 
98
<p>The <a class="reference internal" href="#module-msilib" title="msilib: Creation of Microsoft Installer files, and CAB files. (Windows)"><code class="xref py py-mod docutils literal"><span class="pre">msilib</span></code></a> supports the creation of Microsoft Installer (<code class="docutils literal"><span class="pre">.msi</span></code>) files.
 
99
Because these files often contain an embedded &#8220;cabinet&#8221; file (<code class="docutils literal"><span class="pre">.cab</span></code>), it also
 
100
exposes an API to create CAB files. Support for reading <code class="docutils literal"><span class="pre">.cab</span></code> files is
 
101
currently not implemented; read support for the <code class="docutils literal"><span class="pre">.msi</span></code> database is possible.</p>
 
102
<p>This package aims to provide complete access to all tables in an <code class="docutils literal"><span class="pre">.msi</span></code> file,
 
103
therefore, it is a fairly low-level API. Two primary applications of this
 
104
package are the <a class="reference internal" href="distutils.html#module-distutils" title="distutils: Support for building and installing Python modules into an existing Python installation."><code class="xref py py-mod docutils literal"><span class="pre">distutils</span></code></a> command <code class="docutils literal"><span class="pre">bdist_msi</span></code>, and the creation of
 
105
Python installer package itself (although that currently uses a different
 
106
version of <code class="docutils literal"><span class="pre">msilib</span></code>).</p>
 
107
<p>The package contents can be roughly split into four parts: low-level CAB
 
108
routines, low-level MSI routines, higher-level MSI routines, and standard table
 
109
structures.</p>
 
110
<dl class="function">
 
111
<dt id="msilib.FCICreate">
 
112
<code class="descclassname">msilib.</code><code class="descname">FCICreate</code><span class="sig-paren">(</span><em>cabname</em>, <em>files</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.FCICreate" title="Permalink to this definition">¶</a></dt>
 
113
<dd><p>Create a new CAB file named <em>cabname</em>. <em>files</em> must be a list of tuples, each
 
114
containing the name of the file on disk, and the name of the file inside the CAB
 
115
file.</p>
 
116
<p>The files are added to the CAB file in the order they appear in the list. All
 
117
files are added into a single CAB file, using the MSZIP compression algorithm.</p>
 
118
<p>Callbacks to Python for the various steps of MSI creation are currently not
 
119
exposed.</p>
 
120
</dd></dl>
 
121
 
 
122
<dl class="function">
 
123
<dt id="msilib.UuidCreate">
 
124
<code class="descclassname">msilib.</code><code class="descname">UuidCreate</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#msilib.UuidCreate" title="Permalink to this definition">¶</a></dt>
 
125
<dd><p>Return the string representation of a new unique identifier. This wraps the
 
126
Windows API functions <code class="xref c c-func docutils literal"><span class="pre">UuidCreate()</span></code> and <code class="xref c c-func docutils literal"><span class="pre">UuidToString()</span></code>.</p>
 
127
</dd></dl>
 
128
 
 
129
<dl class="function">
 
130
<dt id="msilib.OpenDatabase">
 
131
<code class="descclassname">msilib.</code><code class="descname">OpenDatabase</code><span class="sig-paren">(</span><em>path</em>, <em>persist</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.OpenDatabase" title="Permalink to this definition">¶</a></dt>
 
132
<dd><p>Return a new database object by calling MsiOpenDatabase.   <em>path</em> is the file
 
133
name of the MSI file; <em>persist</em> can be one of the constants
 
134
<code class="docutils literal"><span class="pre">MSIDBOPEN_CREATEDIRECT</span></code>, <code class="docutils literal"><span class="pre">MSIDBOPEN_CREATE</span></code>, <code class="docutils literal"><span class="pre">MSIDBOPEN_DIRECT</span></code>,
 
135
<code class="docutils literal"><span class="pre">MSIDBOPEN_READONLY</span></code>, or <code class="docutils literal"><span class="pre">MSIDBOPEN_TRANSACT</span></code>, and may include the flag
 
136
<code class="docutils literal"><span class="pre">MSIDBOPEN_PATCHFILE</span></code>. See the Microsoft documentation for the meaning of
 
137
these flags; depending on the flags, an existing database is opened, or a new
 
138
one created.</p>
 
139
</dd></dl>
 
140
 
 
141
<dl class="function">
 
142
<dt id="msilib.CreateRecord">
 
143
<code class="descclassname">msilib.</code><code class="descname">CreateRecord</code><span class="sig-paren">(</span><em>count</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.CreateRecord" title="Permalink to this definition">¶</a></dt>
 
144
<dd><p>Return a new record object by calling <code class="xref c c-func docutils literal"><span class="pre">MSICreateRecord()</span></code>. <em>count</em> is the
 
145
number of fields of the record.</p>
 
146
</dd></dl>
 
147
 
 
148
<dl class="function">
 
149
<dt id="msilib.init_database">
 
150
<code class="descclassname">msilib.</code><code class="descname">init_database</code><span class="sig-paren">(</span><em>name</em>, <em>schema</em>, <em>ProductName</em>, <em>ProductCode</em>, <em>ProductVersion</em>, <em>Manufacturer</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.init_database" title="Permalink to this definition">¶</a></dt>
 
151
<dd><p>Create and return a new database <em>name</em>, initialize it with <em>schema</em>, and set
 
152
the properties <em>ProductName</em>, <em>ProductCode</em>, <em>ProductVersion</em>, and
 
153
<em>Manufacturer</em>.</p>
 
154
<p><em>schema</em> must be a module object containing <code class="docutils literal"><span class="pre">tables</span></code> and
 
155
<code class="docutils literal"><span class="pre">_Validation_records</span></code> attributes; typically, <a class="reference internal" href="#msilib.schema" title="msilib.schema"><code class="xref py py-mod docutils literal"><span class="pre">msilib.schema</span></code></a> should be
 
156
used.</p>
 
157
<p>The database will contain just the schema and the validation records when this
 
158
function returns.</p>
 
159
</dd></dl>
 
160
 
 
161
<dl class="function">
 
162
<dt id="msilib.add_data">
 
163
<code class="descclassname">msilib.</code><code class="descname">add_data</code><span class="sig-paren">(</span><em>database</em>, <em>table</em>, <em>records</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.add_data" title="Permalink to this definition">¶</a></dt>
 
164
<dd><p>Add all <em>records</em> to the table named <em>table</em> in <em>database</em>.</p>
 
165
<p>The <em>table</em> argument must be one of the predefined tables in the MSI schema,
 
166
e.g. <code class="docutils literal"><span class="pre">'Feature'</span></code>, <code class="docutils literal"><span class="pre">'File'</span></code>, <code class="docutils literal"><span class="pre">'Component'</span></code>, <code class="docutils literal"><span class="pre">'Dialog'</span></code>, <code class="docutils literal"><span class="pre">'Control'</span></code>,
 
167
etc.</p>
 
168
<p><em>records</em> should be a list of tuples, each one containing all fields of a
 
169
record according to the schema of the table.  For optional fields,
 
170
<code class="docutils literal"><span class="pre">None</span></code> can be passed.</p>
 
171
<p>Field values can be ints, strings, or instances of the Binary class.</p>
 
172
</dd></dl>
 
173
 
 
174
<dl class="class">
 
175
<dt id="msilib.Binary">
 
176
<em class="property">class </em><code class="descclassname">msilib.</code><code class="descname">Binary</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Binary" title="Permalink to this definition">¶</a></dt>
 
177
<dd><p>Represents entries in the Binary table; inserting such an object using
 
178
<a class="reference internal" href="#msilib.add_data" title="msilib.add_data"><code class="xref py py-func docutils literal"><span class="pre">add_data()</span></code></a> reads the file named <em>filename</em> into the table.</p>
 
179
</dd></dl>
 
180
 
 
181
<dl class="function">
 
182
<dt id="msilib.add_tables">
 
183
<code class="descclassname">msilib.</code><code class="descname">add_tables</code><span class="sig-paren">(</span><em>database</em>, <em>module</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.add_tables" title="Permalink to this definition">¶</a></dt>
 
184
<dd><p>Add all table content from <em>module</em> to <em>database</em>. <em>module</em> must contain an
 
185
attribute <em>tables</em> listing all tables for which content should be added, and one
 
186
attribute per table that has the actual content.</p>
 
187
<p>This is typically used to install the sequence tables.</p>
 
188
</dd></dl>
 
189
 
 
190
<dl class="function">
 
191
<dt id="msilib.add_stream">
 
192
<code class="descclassname">msilib.</code><code class="descname">add_stream</code><span class="sig-paren">(</span><em>database</em>, <em>name</em>, <em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.add_stream" title="Permalink to this definition">¶</a></dt>
 
193
<dd><p>Add the file <em>path</em> into the <code class="docutils literal"><span class="pre">_Stream</span></code> table of <em>database</em>, with the stream
 
194
name <em>name</em>.</p>
 
195
</dd></dl>
 
196
 
 
197
<dl class="function">
 
198
<dt id="msilib.gen_uuid">
 
199
<code class="descclassname">msilib.</code><code class="descname">gen_uuid</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#msilib.gen_uuid" title="Permalink to this definition">¶</a></dt>
 
200
<dd><p>Return a new UUID, in the format that MSI typically requires (i.e. in curly
 
201
braces, and with all hexdigits in upper-case).</p>
 
202
</dd></dl>
 
203
 
 
204
<div class="admonition seealso">
 
205
<p class="first admonition-title">See also</p>
 
206
<p class="last"><a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/devnotes/winprog/fcicreate.asp">FCICreateFile</a>
 
207
<a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/rpc/rpc/uuidcreate.asp">UuidCreate</a>
 
208
<a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/rpc/rpc/uuidtostring.asp">UuidToString</a></p>
 
209
</div>
 
210
<div class="section" id="database-objects">
 
211
<span id="id1"></span><h2>34.1.1. Database Objects<a class="headerlink" href="#database-objects" title="Permalink to this headline">¶</a></h2>
 
212
<dl class="method">
 
213
<dt id="msilib.Database.OpenView">
 
214
<code class="descclassname">Database.</code><code class="descname">OpenView</code><span class="sig-paren">(</span><em>sql</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Database.OpenView" title="Permalink to this definition">¶</a></dt>
 
215
<dd><p>Return a view object, by calling <code class="xref c c-func docutils literal"><span class="pre">MSIDatabaseOpenView()</span></code>. <em>sql</em> is the SQL
 
216
statement to execute.</p>
 
217
</dd></dl>
 
218
 
 
219
<dl class="method">
 
220
<dt id="msilib.Database.Commit">
 
221
<code class="descclassname">Database.</code><code class="descname">Commit</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Database.Commit" title="Permalink to this definition">¶</a></dt>
 
222
<dd><p>Commit the changes pending in the current transaction, by calling
 
223
<code class="xref c c-func docutils literal"><span class="pre">MSIDatabaseCommit()</span></code>.</p>
 
224
</dd></dl>
 
225
 
 
226
<dl class="method">
 
227
<dt id="msilib.Database.GetSummaryInformation">
 
228
<code class="descclassname">Database.</code><code class="descname">GetSummaryInformation</code><span class="sig-paren">(</span><em>count</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Database.GetSummaryInformation" title="Permalink to this definition">¶</a></dt>
 
229
<dd><p>Return a new summary information object, by calling
 
230
<code class="xref c c-func docutils literal"><span class="pre">MsiGetSummaryInformation()</span></code>.  <em>count</em> is the maximum number of updated
 
231
values.</p>
 
232
</dd></dl>
 
233
 
 
234
<div class="admonition seealso">
 
235
<p class="first admonition-title">See also</p>
 
236
<p class="last"><a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msidatabaseopenview.asp">MSIDatabaseOpenView</a>
 
237
<a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msidatabasecommit.asp">MSIDatabaseCommit</a>
 
238
<a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msigetsummaryinformation.asp">MSIGetSummaryInformation</a></p>
 
239
</div>
 
240
</div>
 
241
<div class="section" id="view-objects">
 
242
<span id="id2"></span><h2>34.1.2. View Objects<a class="headerlink" href="#view-objects" title="Permalink to this headline">¶</a></h2>
 
243
<dl class="method">
 
244
<dt id="msilib.View.Execute">
 
245
<code class="descclassname">View.</code><code class="descname">Execute</code><span class="sig-paren">(</span><em>params</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.View.Execute" title="Permalink to this definition">¶</a></dt>
 
246
<dd><p>Execute the SQL query of the view, through <code class="xref c c-func docutils literal"><span class="pre">MSIViewExecute()</span></code>. If
 
247
<em>params</em> is not <code class="docutils literal"><span class="pre">None</span></code>, it is a record describing actual values of the
 
248
parameter tokens in the query.</p>
 
249
</dd></dl>
 
250
 
 
251
<dl class="method">
 
252
<dt id="msilib.View.GetColumnInfo">
 
253
<code class="descclassname">View.</code><code class="descname">GetColumnInfo</code><span class="sig-paren">(</span><em>kind</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.View.GetColumnInfo" title="Permalink to this definition">¶</a></dt>
 
254
<dd><p>Return a record describing the columns of the view, through calling
 
255
<code class="xref c c-func docutils literal"><span class="pre">MsiViewGetColumnInfo()</span></code>. <em>kind</em> can be either <code class="docutils literal"><span class="pre">MSICOLINFO_NAMES</span></code> or
 
256
<code class="docutils literal"><span class="pre">MSICOLINFO_TYPES</span></code>.</p>
 
257
</dd></dl>
 
258
 
 
259
<dl class="method">
 
260
<dt id="msilib.View.Fetch">
 
261
<code class="descclassname">View.</code><code class="descname">Fetch</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#msilib.View.Fetch" title="Permalink to this definition">¶</a></dt>
 
262
<dd><p>Return a result record of the query, through calling <code class="xref c c-func docutils literal"><span class="pre">MsiViewFetch()</span></code>.</p>
 
263
</dd></dl>
 
264
 
 
265
<dl class="method">
 
266
<dt id="msilib.View.Modify">
 
267
<code class="descclassname">View.</code><code class="descname">Modify</code><span class="sig-paren">(</span><em>kind</em>, <em>data</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.View.Modify" title="Permalink to this definition">¶</a></dt>
 
268
<dd><p>Modify the view, by calling <code class="xref c c-func docutils literal"><span class="pre">MsiViewModify()</span></code>. <em>kind</em> can be one of
 
269
<code class="docutils literal"><span class="pre">MSIMODIFY_SEEK</span></code>, <code class="docutils literal"><span class="pre">MSIMODIFY_REFRESH</span></code>, <code class="docutils literal"><span class="pre">MSIMODIFY_INSERT</span></code>,
 
270
<code class="docutils literal"><span class="pre">MSIMODIFY_UPDATE</span></code>, <code class="docutils literal"><span class="pre">MSIMODIFY_ASSIGN</span></code>, <code class="docutils literal"><span class="pre">MSIMODIFY_REPLACE</span></code>,
 
271
<code class="docutils literal"><span class="pre">MSIMODIFY_MERGE</span></code>, <code class="docutils literal"><span class="pre">MSIMODIFY_DELETE</span></code>, <code class="docutils literal"><span class="pre">MSIMODIFY_INSERT_TEMPORARY</span></code>,
 
272
<code class="docutils literal"><span class="pre">MSIMODIFY_VALIDATE</span></code>, <code class="docutils literal"><span class="pre">MSIMODIFY_VALIDATE_NEW</span></code>,
 
273
<code class="docutils literal"><span class="pre">MSIMODIFY_VALIDATE_FIELD</span></code>, or <code class="docutils literal"><span class="pre">MSIMODIFY_VALIDATE_DELETE</span></code>.</p>
 
274
<p><em>data</em> must be a record describing the new data.</p>
 
275
</dd></dl>
 
276
 
 
277
<dl class="method">
 
278
<dt id="msilib.View.Close">
 
279
<code class="descclassname">View.</code><code class="descname">Close</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#msilib.View.Close" title="Permalink to this definition">¶</a></dt>
 
280
<dd><p>Close the view, through <code class="xref c c-func docutils literal"><span class="pre">MsiViewClose()</span></code>.</p>
 
281
</dd></dl>
 
282
 
 
283
<div class="admonition seealso">
 
284
<p class="first admonition-title">See also</p>
 
285
<p class="last"><a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msiviewexecute.asp">MsiViewExecute</a>
 
286
<a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msiviewgetcolumninfo.asp">MSIViewGetColumnInfo</a>
 
287
<a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msiviewfetch.asp">MsiViewFetch</a>
 
288
<a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msiviewmodify.asp">MsiViewModify</a>
 
289
<a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msiviewclose.asp">MsiViewClose</a></p>
 
290
</div>
 
291
</div>
 
292
<div class="section" id="summary-information-objects">
 
293
<span id="summary-objects"></span><h2>34.1.3. Summary Information Objects<a class="headerlink" href="#summary-information-objects" title="Permalink to this headline">¶</a></h2>
 
294
<dl class="method">
 
295
<dt id="msilib.SummaryInformation.GetProperty">
 
296
<code class="descclassname">SummaryInformation.</code><code class="descname">GetProperty</code><span class="sig-paren">(</span><em>field</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.SummaryInformation.GetProperty" title="Permalink to this definition">¶</a></dt>
 
297
<dd><p>Return a property of the summary, through <code class="xref c c-func docutils literal"><span class="pre">MsiSummaryInfoGetProperty()</span></code>.
 
298
<em>field</em> is the name of the property, and can be one of the constants
 
299
<code class="docutils literal"><span class="pre">PID_CODEPAGE</span></code>, <code class="docutils literal"><span class="pre">PID_TITLE</span></code>, <code class="docutils literal"><span class="pre">PID_SUBJECT</span></code>, <code class="docutils literal"><span class="pre">PID_AUTHOR</span></code>,
 
300
<code class="docutils literal"><span class="pre">PID_KEYWORDS</span></code>, <code class="docutils literal"><span class="pre">PID_COMMENTS</span></code>, <code class="docutils literal"><span class="pre">PID_TEMPLATE</span></code>, <code class="docutils literal"><span class="pre">PID_LASTAUTHOR</span></code>,
 
301
<code class="docutils literal"><span class="pre">PID_REVNUMBER</span></code>, <code class="docutils literal"><span class="pre">PID_LASTPRINTED</span></code>, <code class="docutils literal"><span class="pre">PID_CREATE_DTM</span></code>,
 
302
<code class="docutils literal"><span class="pre">PID_LASTSAVE_DTM</span></code>, <code class="docutils literal"><span class="pre">PID_PAGECOUNT</span></code>, <code class="docutils literal"><span class="pre">PID_WORDCOUNT</span></code>, <code class="docutils literal"><span class="pre">PID_CHARCOUNT</span></code>,
 
303
<code class="docutils literal"><span class="pre">PID_APPNAME</span></code>, or <code class="docutils literal"><span class="pre">PID_SECURITY</span></code>.</p>
 
304
</dd></dl>
 
305
 
 
306
<dl class="method">
 
307
<dt id="msilib.SummaryInformation.GetPropertyCount">
 
308
<code class="descclassname">SummaryInformation.</code><code class="descname">GetPropertyCount</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#msilib.SummaryInformation.GetPropertyCount" title="Permalink to this definition">¶</a></dt>
 
309
<dd><p>Return the number of summary properties, through
 
310
<code class="xref c c-func docutils literal"><span class="pre">MsiSummaryInfoGetPropertyCount()</span></code>.</p>
 
311
</dd></dl>
 
312
 
 
313
<dl class="method">
 
314
<dt id="msilib.SummaryInformation.SetProperty">
 
315
<code class="descclassname">SummaryInformation.</code><code class="descname">SetProperty</code><span class="sig-paren">(</span><em>field</em>, <em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.SummaryInformation.SetProperty" title="Permalink to this definition">¶</a></dt>
 
316
<dd><p>Set a property through <code class="xref c c-func docutils literal"><span class="pre">MsiSummaryInfoSetProperty()</span></code>. <em>field</em> can have the
 
317
same values as in <a class="reference internal" href="#msilib.SummaryInformation.GetProperty" title="msilib.SummaryInformation.GetProperty"><code class="xref py py-meth docutils literal"><span class="pre">GetProperty()</span></code></a>, <em>value</em> is the new value of the property.
 
318
Possible value types are integer and string.</p>
 
319
</dd></dl>
 
320
 
 
321
<dl class="method">
 
322
<dt id="msilib.SummaryInformation.Persist">
 
323
<code class="descclassname">SummaryInformation.</code><code class="descname">Persist</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#msilib.SummaryInformation.Persist" title="Permalink to this definition">¶</a></dt>
 
324
<dd><p>Write the modified properties to the summary information stream, using
 
325
<code class="xref c c-func docutils literal"><span class="pre">MsiSummaryInfoPersist()</span></code>.</p>
 
326
</dd></dl>
 
327
 
 
328
<div class="admonition seealso">
 
329
<p class="first admonition-title">See also</p>
 
330
<p class="last"><a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msisummaryinfogetproperty.asp">MsiSummaryInfoGetProperty</a>
 
331
<a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msisummaryinfogetpropertycount.asp">MsiSummaryInfoGetPropertyCount</a>
 
332
<a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msisummaryinfosetproperty.asp">MsiSummaryInfoSetProperty</a>
 
333
<a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msisummaryinfopersist.asp">MsiSummaryInfoPersist</a></p>
 
334
</div>
 
335
</div>
 
336
<div class="section" id="record-objects">
 
337
<span id="id3"></span><h2>34.1.4. Record Objects<a class="headerlink" href="#record-objects" title="Permalink to this headline">¶</a></h2>
 
338
<dl class="method">
 
339
<dt id="msilib.Record.GetFieldCount">
 
340
<code class="descclassname">Record.</code><code class="descname">GetFieldCount</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Record.GetFieldCount" title="Permalink to this definition">¶</a></dt>
 
341
<dd><p>Return the number of fields of the record, through
 
342
<code class="xref c c-func docutils literal"><span class="pre">MsiRecordGetFieldCount()</span></code>.</p>
 
343
</dd></dl>
 
344
 
 
345
<dl class="method">
 
346
<dt id="msilib.Record.GetInteger">
 
347
<code class="descclassname">Record.</code><code class="descname">GetInteger</code><span class="sig-paren">(</span><em>field</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Record.GetInteger" title="Permalink to this definition">¶</a></dt>
 
348
<dd><p>Return the value of <em>field</em> as an integer where possible.  <em>field</em> must
 
349
be an integer.</p>
 
350
</dd></dl>
 
351
 
 
352
<dl class="method">
 
353
<dt id="msilib.Record.GetString">
 
354
<code class="descclassname">Record.</code><code class="descname">GetString</code><span class="sig-paren">(</span><em>field</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Record.GetString" title="Permalink to this definition">¶</a></dt>
 
355
<dd><p>Return the value of <em>field</em> as a string where possible.  <em>field</em> must
 
356
be an integer.</p>
 
357
</dd></dl>
 
358
 
 
359
<dl class="method">
 
360
<dt id="msilib.Record.SetString">
 
361
<code class="descclassname">Record.</code><code class="descname">SetString</code><span class="sig-paren">(</span><em>field</em>, <em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Record.SetString" title="Permalink to this definition">¶</a></dt>
 
362
<dd><p>Set <em>field</em> to <em>value</em> through <code class="xref c c-func docutils literal"><span class="pre">MsiRecordSetString()</span></code>. <em>field</em> must be an
 
363
integer; <em>value</em> a string.</p>
 
364
</dd></dl>
 
365
 
 
366
<dl class="method">
 
367
<dt id="msilib.Record.SetStream">
 
368
<code class="descclassname">Record.</code><code class="descname">SetStream</code><span class="sig-paren">(</span><em>field</em>, <em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Record.SetStream" title="Permalink to this definition">¶</a></dt>
 
369
<dd><p>Set <em>field</em> to the contents of the file named <em>value</em>, through
 
370
<code class="xref c c-func docutils literal"><span class="pre">MsiRecordSetStream()</span></code>. <em>field</em> must be an integer; <em>value</em> a string.</p>
 
371
</dd></dl>
 
372
 
 
373
<dl class="method">
 
374
<dt id="msilib.Record.SetInteger">
 
375
<code class="descclassname">Record.</code><code class="descname">SetInteger</code><span class="sig-paren">(</span><em>field</em>, <em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Record.SetInteger" title="Permalink to this definition">¶</a></dt>
 
376
<dd><p>Set <em>field</em> to <em>value</em> through <code class="xref c c-func docutils literal"><span class="pre">MsiRecordSetInteger()</span></code>. Both <em>field</em> and
 
377
<em>value</em> must be an integer.</p>
 
378
</dd></dl>
 
379
 
 
380
<dl class="method">
 
381
<dt id="msilib.Record.ClearData">
 
382
<code class="descclassname">Record.</code><code class="descname">ClearData</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Record.ClearData" title="Permalink to this definition">¶</a></dt>
 
383
<dd><p>Set all fields of the record to 0, through <code class="xref c c-func docutils literal"><span class="pre">MsiRecordClearData()</span></code>.</p>
 
384
</dd></dl>
 
385
 
 
386
<div class="admonition seealso">
 
387
<p class="first admonition-title">See also</p>
 
388
<p class="last"><a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msirecordgetfieldcount.asp">MsiRecordGetFieldCount</a>
 
389
<a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msirecordsetstring.asp">MsiRecordSetString</a>
 
390
<a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msirecordsetstream.asp">MsiRecordSetStream</a>
 
391
<a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msirecordsetinteger.asp">MsiRecordSetInteger</a>
 
392
<a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msirecordclear.asp">MsiRecordClear</a></p>
 
393
</div>
 
394
</div>
 
395
<div class="section" id="errors">
 
396
<span id="msi-errors"></span><h2>34.1.5. Errors<a class="headerlink" href="#errors" title="Permalink to this headline">¶</a></h2>
 
397
<p>All wrappers around MSI functions raise <code class="xref py py-exc docutils literal"><span class="pre">MsiError</span></code>; the string inside the
 
398
exception will contain more detail.</p>
 
399
</div>
 
400
<div class="section" id="cab-objects">
 
401
<span id="cab"></span><h2>34.1.6. CAB Objects<a class="headerlink" href="#cab-objects" title="Permalink to this headline">¶</a></h2>
 
402
<dl class="class">
 
403
<dt id="msilib.CAB">
 
404
<em class="property">class </em><code class="descclassname">msilib.</code><code class="descname">CAB</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.CAB" title="Permalink to this definition">¶</a></dt>
 
405
<dd><p>The class <a class="reference internal" href="#msilib.CAB" title="msilib.CAB"><code class="xref py py-class docutils literal"><span class="pre">CAB</span></code></a> represents a CAB file. During MSI construction, files
 
406
will be added simultaneously to the <code class="docutils literal"><span class="pre">Files</span></code> table, and to a CAB file. Then,
 
407
when all files have been added, the CAB file can be written, then added to the
 
408
MSI file.</p>
 
409
<p><em>name</em> is the name of the CAB file in the MSI file.</p>
 
410
<dl class="method">
 
411
<dt id="msilib.CAB.append">
 
412
<code class="descname">append</code><span class="sig-paren">(</span><em>full</em>, <em>file</em>, <em>logical</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.CAB.append" title="Permalink to this definition">¶</a></dt>
 
413
<dd><p>Add the file with the pathname <em>full</em> to the CAB file, under the name
 
414
<em>logical</em>.  If there is already a file named <em>logical</em>, a new file name is
 
415
created.</p>
 
416
<p>Return the index of the file in the CAB file, and the new name of the file
 
417
inside the CAB file.</p>
 
418
</dd></dl>
 
419
 
 
420
<dl class="method">
 
421
<dt id="msilib.CAB.commit">
 
422
<code class="descname">commit</code><span class="sig-paren">(</span><em>database</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.CAB.commit" title="Permalink to this definition">¶</a></dt>
 
423
<dd><p>Generate a CAB file, add it as a stream to the MSI file, put it into the
 
424
<code class="docutils literal"><span class="pre">Media</span></code> table, and remove the generated file from the disk.</p>
 
425
</dd></dl>
 
426
 
 
427
</dd></dl>
 
428
 
 
429
</div>
 
430
<div class="section" id="directory-objects">
 
431
<span id="msi-directory"></span><h2>34.1.7. Directory Objects<a class="headerlink" href="#directory-objects" title="Permalink to this headline">¶</a></h2>
 
432
<dl class="class">
 
433
<dt id="msilib.Directory">
 
434
<em class="property">class </em><code class="descclassname">msilib.</code><code class="descname">Directory</code><span class="sig-paren">(</span><em>database</em>, <em>cab</em>, <em>basedir</em>, <em>physical</em>, <em>logical</em>, <em>default</em><span class="optional">[</span>, <em>componentflags</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Directory" title="Permalink to this definition">¶</a></dt>
 
435
<dd><p>Create a new directory in the Directory table. There is a current component at
 
436
each point in time for the directory, which is either explicitly created through
 
437
<a class="reference internal" href="#msilib.Directory.start_component" title="msilib.Directory.start_component"><code class="xref py py-meth docutils literal"><span class="pre">start_component()</span></code></a>, or implicitly when files are added for the first time.
 
438
Files are added into the current component, and into the cab file.  To create a
 
439
directory, a base directory object needs to be specified (can be <code class="docutils literal"><span class="pre">None</span></code>), the
 
440
path to the physical directory, and a logical directory name.  <em>default</em>
 
441
specifies the DefaultDir slot in the directory table. <em>componentflags</em> specifies
 
442
the default flags that new components get.</p>
 
443
<dl class="method">
 
444
<dt id="msilib.Directory.start_component">
 
445
<code class="descname">start_component</code><span class="sig-paren">(</span><em>component=None</em>, <em>feature=None</em>, <em>flags=None</em>, <em>keyfile=None</em>, <em>uuid=None</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Directory.start_component" title="Permalink to this definition">¶</a></dt>
 
446
<dd><p>Add an entry to the Component table, and make this component the current
 
447
component for this directory. If no component name is given, the directory
 
448
name is used. If no <em>feature</em> is given, the current feature is used. If no
 
449
<em>flags</em> are given, the directory&#8217;s default flags are used. If no <em>keyfile</em>
 
450
is given, the KeyPath is left null in the Component table.</p>
 
451
</dd></dl>
 
452
 
 
453
<dl class="method">
 
454
<dt id="msilib.Directory.add_file">
 
455
<code class="descname">add_file</code><span class="sig-paren">(</span><em>file</em>, <em>src=None</em>, <em>version=None</em>, <em>language=None</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Directory.add_file" title="Permalink to this definition">¶</a></dt>
 
456
<dd><p>Add a file to the current component of the directory, starting a new one
 
457
if there is no current component. By default, the file name in the source
 
458
and the file table will be identical. If the <em>src</em> file is specified, it
 
459
is interpreted relative to the current directory. Optionally, a <em>version</em>
 
460
and a <em>language</em> can be specified for the entry in the File table.</p>
 
461
</dd></dl>
 
462
 
 
463
<dl class="method">
 
464
<dt id="msilib.Directory.glob">
 
465
<code class="descname">glob</code><span class="sig-paren">(</span><em>pattern</em>, <em>exclude=None</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Directory.glob" title="Permalink to this definition">¶</a></dt>
 
466
<dd><p>Add a list of files to the current component as specified in the glob
 
467
pattern.  Individual files can be excluded in the <em>exclude</em> list.</p>
 
468
</dd></dl>
 
469
 
 
470
<dl class="method">
 
471
<dt id="msilib.Directory.remove_pyc">
 
472
<code class="descname">remove_pyc</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Directory.remove_pyc" title="Permalink to this definition">¶</a></dt>
 
473
<dd><p>Remove <code class="docutils literal"><span class="pre">.pyc</span></code>/<code class="docutils literal"><span class="pre">.pyo</span></code> files on uninstall.</p>
 
474
</dd></dl>
 
475
 
 
476
</dd></dl>
 
477
 
 
478
<div class="admonition seealso">
 
479
<p class="first admonition-title">See also</p>
 
480
<p class="last"><a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/directory_table.asp">Directory Table</a>
 
481
<a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/file_table.asp">File Table</a>
 
482
<a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/component_table.asp">Component Table</a>
 
483
<a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/featurecomponents_table.asp">FeatureComponents Table</a></p>
 
484
</div>
 
485
</div>
 
486
<div class="section" id="features">
 
487
<span id="id4"></span><h2>34.1.8. Features<a class="headerlink" href="#features" title="Permalink to this headline">¶</a></h2>
 
488
<dl class="class">
 
489
<dt id="msilib.Feature">
 
490
<em class="property">class </em><code class="descclassname">msilib.</code><code class="descname">Feature</code><span class="sig-paren">(</span><em>db</em>, <em>id</em>, <em>title</em>, <em>desc</em>, <em>display</em>, <em>level=1</em>, <em>parent=None</em>, <em>directory=None</em>, <em>attributes=0</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Feature" title="Permalink to this definition">¶</a></dt>
 
491
<dd><p>Add a new record to the <code class="docutils literal"><span class="pre">Feature</span></code> table, using the values <em>id</em>, <em>parent.id</em>,
 
492
<em>title</em>, <em>desc</em>, <em>display</em>, <em>level</em>, <em>directory</em>, and <em>attributes</em>. The
 
493
resulting feature object can be passed to the <code class="xref py py-meth docutils literal"><span class="pre">start_component()</span></code> method of
 
494
<a class="reference internal" href="#msilib.Directory" title="msilib.Directory"><code class="xref py py-class docutils literal"><span class="pre">Directory</span></code></a>.</p>
 
495
<dl class="method">
 
496
<dt id="msilib.Feature.set_current">
 
497
<code class="descname">set_current</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Feature.set_current" title="Permalink to this definition">¶</a></dt>
 
498
<dd><p>Make this feature the current feature of <a class="reference internal" href="#module-msilib" title="msilib: Creation of Microsoft Installer files, and CAB files. (Windows)"><code class="xref py py-mod docutils literal"><span class="pre">msilib</span></code></a>. New components are
 
499
automatically added to the default feature, unless a feature is explicitly
 
500
specified.</p>
 
501
</dd></dl>
 
502
 
 
503
</dd></dl>
 
504
 
 
505
<div class="admonition seealso">
 
506
<p class="first admonition-title">See also</p>
 
507
<p class="last"><a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/feature_table.asp">Feature Table</a></p>
 
508
</div>
 
509
</div>
 
510
<div class="section" id="gui-classes">
 
511
<span id="msi-gui"></span><h2>34.1.9. GUI classes<a class="headerlink" href="#gui-classes" title="Permalink to this headline">¶</a></h2>
 
512
<p><a class="reference internal" href="#module-msilib" title="msilib: Creation of Microsoft Installer files, and CAB files. (Windows)"><code class="xref py py-mod docutils literal"><span class="pre">msilib</span></code></a> provides several classes that wrap the GUI tables in an MSI
 
513
database. However, no standard user interface is provided; use
 
514
<a class="reference internal" href="../distutils/apiref.html#module-distutils.command.bdist_msi" title="distutils.command.bdist_msi: Build a binary distribution as a Windows MSI file"><code class="xref py py-mod docutils literal"><span class="pre">bdist_msi</span></code></a> to create MSI files with a user-interface
 
515
for installing Python packages.</p>
 
516
<dl class="class">
 
517
<dt id="msilib.Control">
 
518
<em class="property">class </em><code class="descclassname">msilib.</code><code class="descname">Control</code><span class="sig-paren">(</span><em>dlg</em>, <em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Control" title="Permalink to this definition">¶</a></dt>
 
519
<dd><p>Base class of the dialog controls. <em>dlg</em> is the dialog object the control
 
520
belongs to, and <em>name</em> is the control&#8217;s name.</p>
 
521
<dl class="method">
 
522
<dt id="msilib.Control.event">
 
523
<code class="descname">event</code><span class="sig-paren">(</span><em>event</em>, <em>argument</em>, <em>condition=1</em>, <em>ordering=None</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Control.event" title="Permalink to this definition">¶</a></dt>
 
524
<dd><p>Make an entry into the <code class="docutils literal"><span class="pre">ControlEvent</span></code> table for this control.</p>
 
525
</dd></dl>
 
526
 
 
527
<dl class="method">
 
528
<dt id="msilib.Control.mapping">
 
529
<code class="descname">mapping</code><span class="sig-paren">(</span><em>event</em>, <em>attribute</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Control.mapping" title="Permalink to this definition">¶</a></dt>
 
530
<dd><p>Make an entry into the <code class="docutils literal"><span class="pre">EventMapping</span></code> table for this control.</p>
 
531
</dd></dl>
 
532
 
 
533
<dl class="method">
 
534
<dt id="msilib.Control.condition">
 
535
<code class="descname">condition</code><span class="sig-paren">(</span><em>action</em>, <em>condition</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Control.condition" title="Permalink to this definition">¶</a></dt>
 
536
<dd><p>Make an entry into the <code class="docutils literal"><span class="pre">ControlCondition</span></code> table for this control.</p>
 
537
</dd></dl>
 
538
 
 
539
</dd></dl>
 
540
 
 
541
<dl class="class">
 
542
<dt id="msilib.RadioButtonGroup">
 
543
<em class="property">class </em><code class="descclassname">msilib.</code><code class="descname">RadioButtonGroup</code><span class="sig-paren">(</span><em>dlg</em>, <em>name</em>, <em>property</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.RadioButtonGroup" title="Permalink to this definition">¶</a></dt>
 
544
<dd><p>Create a radio button control named <em>name</em>. <em>property</em> is the installer property
 
545
that gets set when a radio button is selected.</p>
 
546
<dl class="method">
 
547
<dt id="msilib.RadioButtonGroup.add">
 
548
<code class="descname">add</code><span class="sig-paren">(</span><em>name</em>, <em>x</em>, <em>y</em>, <em>width</em>, <em>height</em>, <em>text</em>, <em>value=None</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.RadioButtonGroup.add" title="Permalink to this definition">¶</a></dt>
 
549
<dd><p>Add a radio button named <em>name</em> to the group, at the coordinates <em>x</em>, <em>y</em>,
 
550
<em>width</em>, <em>height</em>, and with the label <em>text</em>. If <em>value</em> is <code class="docutils literal"><span class="pre">None</span></code>, it
 
551
defaults to <em>name</em>.</p>
 
552
</dd></dl>
 
553
 
 
554
</dd></dl>
 
555
 
 
556
<dl class="class">
 
557
<dt id="msilib.Dialog">
 
558
<em class="property">class </em><code class="descclassname">msilib.</code><code class="descname">Dialog</code><span class="sig-paren">(</span><em>db</em>, <em>name</em>, <em>x</em>, <em>y</em>, <em>w</em>, <em>h</em>, <em>attr</em>, <em>title</em>, <em>first</em>, <em>default</em>, <em>cancel</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Dialog" title="Permalink to this definition">¶</a></dt>
 
559
<dd><p>Return a new <a class="reference internal" href="#msilib.Dialog" title="msilib.Dialog"><code class="xref py py-class docutils literal"><span class="pre">Dialog</span></code></a> object. An entry in the <code class="docutils literal"><span class="pre">Dialog</span></code> table is made,
 
560
with the specified coordinates, dialog attributes, title, name of the first,
 
561
default, and cancel controls.</p>
 
562
<dl class="method">
 
563
<dt id="msilib.Dialog.control">
 
564
<code class="descname">control</code><span class="sig-paren">(</span><em>name</em>, <em>type</em>, <em>x</em>, <em>y</em>, <em>width</em>, <em>height</em>, <em>attributes</em>, <em>property</em>, <em>text</em>, <em>control_next</em>, <em>help</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Dialog.control" title="Permalink to this definition">¶</a></dt>
 
565
<dd><p>Return a new <a class="reference internal" href="#msilib.Control" title="msilib.Control"><code class="xref py py-class docutils literal"><span class="pre">Control</span></code></a> object. An entry in the <code class="docutils literal"><span class="pre">Control</span></code> table is
 
566
made with the specified parameters.</p>
 
567
<p>This is a generic method; for specific types, specialized methods are
 
568
provided.</p>
 
569
</dd></dl>
 
570
 
 
571
<dl class="method">
 
572
<dt id="msilib.Dialog.text">
 
573
<code class="descname">text</code><span class="sig-paren">(</span><em>name</em>, <em>x</em>, <em>y</em>, <em>width</em>, <em>height</em>, <em>attributes</em>, <em>text</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Dialog.text" title="Permalink to this definition">¶</a></dt>
 
574
<dd><p>Add and return a <code class="docutils literal"><span class="pre">Text</span></code> control.</p>
 
575
</dd></dl>
 
576
 
 
577
<dl class="method">
 
578
<dt id="msilib.Dialog.bitmap">
 
579
<code class="descname">bitmap</code><span class="sig-paren">(</span><em>name</em>, <em>x</em>, <em>y</em>, <em>width</em>, <em>height</em>, <em>text</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Dialog.bitmap" title="Permalink to this definition">¶</a></dt>
 
580
<dd><p>Add and return a <code class="docutils literal"><span class="pre">Bitmap</span></code> control.</p>
 
581
</dd></dl>
 
582
 
 
583
<dl class="method">
 
584
<dt id="msilib.Dialog.line">
 
585
<code class="descname">line</code><span class="sig-paren">(</span><em>name</em>, <em>x</em>, <em>y</em>, <em>width</em>, <em>height</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Dialog.line" title="Permalink to this definition">¶</a></dt>
 
586
<dd><p>Add and return a <code class="docutils literal"><span class="pre">Line</span></code> control.</p>
 
587
</dd></dl>
 
588
 
 
589
<dl class="method">
 
590
<dt id="msilib.Dialog.pushbutton">
 
591
<code class="descname">pushbutton</code><span class="sig-paren">(</span><em>name</em>, <em>x</em>, <em>y</em>, <em>width</em>, <em>height</em>, <em>attributes</em>, <em>text</em>, <em>next_control</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Dialog.pushbutton" title="Permalink to this definition">¶</a></dt>
 
592
<dd><p>Add and return a <code class="docutils literal"><span class="pre">PushButton</span></code> control.</p>
 
593
</dd></dl>
 
594
 
 
595
<dl class="method">
 
596
<dt id="msilib.Dialog.radiogroup">
 
597
<code class="descname">radiogroup</code><span class="sig-paren">(</span><em>name</em>, <em>x</em>, <em>y</em>, <em>width</em>, <em>height</em>, <em>attributes</em>, <em>property</em>, <em>text</em>, <em>next_control</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Dialog.radiogroup" title="Permalink to this definition">¶</a></dt>
 
598
<dd><p>Add and return a <code class="docutils literal"><span class="pre">RadioButtonGroup</span></code> control.</p>
 
599
</dd></dl>
 
600
 
 
601
<dl class="method">
 
602
<dt id="msilib.Dialog.checkbox">
 
603
<code class="descname">checkbox</code><span class="sig-paren">(</span><em>name</em>, <em>x</em>, <em>y</em>, <em>width</em>, <em>height</em>, <em>attributes</em>, <em>property</em>, <em>text</em>, <em>next_control</em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Dialog.checkbox" title="Permalink to this definition">¶</a></dt>
 
604
<dd><p>Add and return a <code class="docutils literal"><span class="pre">CheckBox</span></code> control.</p>
 
605
</dd></dl>
 
606
 
 
607
</dd></dl>
 
608
 
 
609
<div class="admonition seealso">
 
610
<p class="first admonition-title">See also</p>
 
611
<p class="last"><a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/dialog_table.asp">Dialog Table</a>
 
612
<a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/control_table.asp">Control Table</a>
 
613
<a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/controls.asp">Control Types</a>
 
614
<a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/controlcondition_table.asp">ControlCondition Table</a>
 
615
<a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/controlevent_table.asp">ControlEvent Table</a>
 
616
<a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/eventmapping_table.asp">EventMapping Table</a>
 
617
<a class="reference external" href="https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/radiobutton_table.asp">RadioButton Table</a></p>
 
618
</div>
 
619
</div>
 
620
<div class="section" id="precomputed-tables">
 
621
<span id="msi-tables"></span><h2>34.1.10. Precomputed tables<a class="headerlink" href="#precomputed-tables" title="Permalink to this headline">¶</a></h2>
 
622
<p><a class="reference internal" href="#module-msilib" title="msilib: Creation of Microsoft Installer files, and CAB files. (Windows)"><code class="xref py py-mod docutils literal"><span class="pre">msilib</span></code></a> provides a few subpackages that contain only schema and table
 
623
definitions. Currently, these definitions are based on MSI version 2.0.</p>
 
624
<dl class="data">
 
625
<dt id="msilib.schema">
 
626
<code class="descclassname">msilib.</code><code class="descname">schema</code><a class="headerlink" href="#msilib.schema" title="Permalink to this definition">¶</a></dt>
 
627
<dd><p>This is the standard MSI schema for MSI 2.0, with the <em>tables</em> variable
 
628
providing a list of table definitions, and <em>_Validation_records</em> providing the
 
629
data for MSI validation.</p>
 
630
</dd></dl>
 
631
 
 
632
<dl class="data">
 
633
<dt id="msilib.sequence">
 
634
<code class="descclassname">msilib.</code><code class="descname">sequence</code><a class="headerlink" href="#msilib.sequence" title="Permalink to this definition">¶</a></dt>
 
635
<dd><p>This module contains table contents for the standard sequence tables:
 
636
<em>AdminExecuteSequence</em>, <em>AdminUISequence</em>, <em>AdvtExecuteSequence</em>,
 
637
<em>InstallExecuteSequence</em>, and <em>InstallUISequence</em>.</p>
 
638
</dd></dl>
 
639
 
 
640
<dl class="data">
 
641
<dt id="msilib.text">
 
642
<code class="descclassname">msilib.</code><code class="descname">text</code><a class="headerlink" href="#msilib.text" title="Permalink to this definition">¶</a></dt>
 
643
<dd><p>This module contains definitions for the UIText and ActionText tables, for the
 
644
standard installer actions.</p>
 
645
</dd></dl>
 
646
 
 
647
</div>
 
648
</div>
 
649
 
 
650
 
 
651
          </div>
 
652
        </div>
 
653
      </div>
 
654
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
 
655
        <div class="sphinxsidebarwrapper">
 
656
  <h3><a href="../contents.html">Table Of Contents</a></h3>
 
657
  <ul>
 
658
<li><a class="reference internal" href="#">34.1. <code class="docutils literal"><span class="pre">msilib</span></code> &#8212; Read and write Microsoft Installer files</a><ul>
 
659
<li><a class="reference internal" href="#database-objects">34.1.1. Database Objects</a></li>
 
660
<li><a class="reference internal" href="#view-objects">34.1.2. View Objects</a></li>
 
661
<li><a class="reference internal" href="#summary-information-objects">34.1.3. Summary Information Objects</a></li>
 
662
<li><a class="reference internal" href="#record-objects">34.1.4. Record Objects</a></li>
 
663
<li><a class="reference internal" href="#errors">34.1.5. Errors</a></li>
 
664
<li><a class="reference internal" href="#cab-objects">34.1.6. CAB Objects</a></li>
 
665
<li><a class="reference internal" href="#directory-objects">34.1.7. Directory Objects</a></li>
 
666
<li><a class="reference internal" href="#features">34.1.8. Features</a></li>
 
667
<li><a class="reference internal" href="#gui-classes">34.1.9. GUI classes</a></li>
 
668
<li><a class="reference internal" href="#precomputed-tables">34.1.10. Precomputed tables</a></li>
 
669
</ul>
 
670
</li>
 
671
</ul>
 
672
 
 
673
  <h4>Previous topic</h4>
 
674
  <p class="topless"><a href="windows.html"
 
675
                        title="previous chapter">34. MS Windows Specific Services</a></p>
 
676
  <h4>Next topic</h4>
 
677
  <p class="topless"><a href="msvcrt.html"
 
678
                        title="next chapter">34.2. <code class="docutils literal"><span class="pre">msvcrt</span></code> &#8211; Useful routines from the MS VC++ runtime</a></p>
 
679
  <div role="note" aria-label="source link">
 
680
    <h3>This Page</h3>
 
681
    <ul class="this-page-menu">
 
682
      <li><a href="../bugs.html">Report a Bug</a></li>
 
683
      <li><a href="../_sources/library/msilib.txt"
 
684
            rel="nofollow">Show Source</a></li>
 
685
    </ul>
 
686
  </div>
 
687
        </div>
 
688
      </div>
 
689
      <div class="clearer"></div>
 
690
    </div>  
 
691
    <div class="related" role="navigation" aria-label="related navigation">
 
692
      <h3>Navigation</h3>
 
693
      <ul>
 
694
        <li class="right" style="margin-right: 10px">
 
695
          <a href="../genindex.html" title="General Index"
 
696
             >index</a></li>
 
697
        <li class="right" >
 
698
          <a href="../py-modindex.html" title="Python Module Index"
 
699
             >modules</a> |</li>
 
700
        <li class="right" >
 
701
          <a href="msvcrt.html" title="34.2. msvcrt – Useful routines from the MS VC++ runtime"
 
702
             >next</a> |</li>
 
703
        <li class="right" >
 
704
          <a href="windows.html" title="34. MS Windows Specific Services"
 
705
             >previous</a> |</li>
 
706
        <li><img src="../_static/py.png" alt=""
 
707
                 style="vertical-align: middle; margin-top: -1px"/></li>
 
708
        <li><a href="https://www.python.org/">Python</a> &raquo;</li>
 
709
        <li>
 
710
          <span class="version_switcher_placeholder">3.5.2</span>
 
711
          <a href="../index.html">Documentation </a> &raquo;
 
712
        </li>
 
713
 
 
714
          <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &raquo;</li>
 
715
          <li class="nav-item nav-item-2"><a href="windows.html" >34. MS Windows Specific Services</a> &raquo;</li>
 
716
    <li class="right">
 
717
        
 
718
 
 
719
    <div class="inline-search" style="display: none" role="search">
 
720
        <form class="inline-search" action="../search.html" method="get">
 
721
          <input placeholder="Quick search" type="text" name="q" />
 
722
          <input type="submit" value="Go" />
 
723
          <input type="hidden" name="check_keywords" value="yes" />
 
724
          <input type="hidden" name="area" value="default" />
 
725
        </form>
 
726
    </div>
 
727
    <script type="text/javascript">$('.inline-search').show(0);</script>
 
728
         |
 
729
    </li>
 
730
 
 
731
      </ul>
 
732
    </div>  
 
733
    <div class="footer">
 
734
    &copy; <a href="../copyright.html">Copyright</a> 2001-2016, Python Software Foundation.
 
735
    <br />
 
736
    The Python Software Foundation is a non-profit corporation.
 
737
    <a href="https://www.python.org/psf/donations/">Please donate.</a>
 
738
    <br />
 
739
    Last updated on Sep 23, 2016.
 
740
    <a href="../bugs.html">Found a bug</a>?
 
741
    <br />
 
742
    Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.3.3.
 
743
    </div>
 
744
 
 
745
  </body>
 
746
</html>
 
 
b'\\ No newline at end of file'