gooderp18绿色标准版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

911 line
80KB

  1. <!DOCTYPE html>
  2. <html lang="en" data-content_root="../">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
  6. <meta property="og:title" content="msilib — Read and write Microsoft Installer files" />
  7. <meta property="og:type" content="website" />
  8. <meta property="og:url" content="https://docs.python.org/3/library/msilib.html" />
  9. <meta property="og:site_name" content="Python documentation" />
  10. <meta property="og:description" content="Source code: Lib/msilib/__init__.py 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..." />
  11. <meta property="og:image" content="https://docs.python.org/3/_static/og-image.png" />
  12. <meta property="og:image:alt" content="Python documentation" />
  13. <meta name="description" content="Source code: Lib/msilib/__init__.py 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..." />
  14. <meta property="og:image:width" content="200" />
  15. <meta property="og:image:height" content="200" />
  16. <meta name="theme-color" content="#3776ab" />
  17. <title>msilib — Read and write Microsoft Installer files &#8212; Python 3.12.3 documentation</title><meta name="viewport" content="width=device-width, initial-scale=1.0">
  18. <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=80d5e7a1" />
  19. <link rel="stylesheet" type="text/css" href="../_static/pydoctheme.css?v=bb723527" />
  20. <link id="pygments_dark_css" media="(prefers-color-scheme: dark)" rel="stylesheet" type="text/css" href="../_static/pygments_dark.css?v=b20cc3f5" />
  21. <script src="../_static/documentation_options.js?v=2c828074"></script>
  22. <script src="../_static/doctools.js?v=888ff710"></script>
  23. <script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
  24. <script src="../_static/sidebar.js"></script>
  25. <link rel="search" type="application/opensearchdescription+xml"
  26. title="Search within Python 3.12.3 documentation"
  27. href="../_static/opensearch.xml"/>
  28. <link rel="author" title="About these documents" href="../about.html" />
  29. <link rel="index" title="Index" href="../genindex.html" />
  30. <link rel="search" title="Search" href="../search.html" />
  31. <link rel="copyright" title="Copyright" href="../copyright.html" />
  32. <link rel="next" title="nis — Interface to Sun’s NIS (Yellow Pages)" href="nis.html" />
  33. <link rel="prev" title="mailcap — Mailcap file handling" href="mailcap.html" />
  34. <link rel="canonical" href="https://docs.python.org/3/library/msilib.html" />
  35. <style>
  36. @media only screen {
  37. table.full-width-table {
  38. width: 100%;
  39. }
  40. }
  41. </style>
  42. <link rel="stylesheet" href="../_static/pydoctheme_dark.css" media="(prefers-color-scheme: dark)" id="pydoctheme_dark_css">
  43. <link rel="shortcut icon" type="image/png" href="../_static/py.svg" />
  44. <script type="text/javascript" src="../_static/copybutton.js"></script>
  45. <script type="text/javascript" src="../_static/menu.js"></script>
  46. <script type="text/javascript" src="../_static/search-focus.js"></script>
  47. <script type="text/javascript" src="../_static/themetoggle.js"></script>
  48. </head>
  49. <body>
  50. <div class="mobile-nav">
  51. <input type="checkbox" id="menuToggler" class="toggler__input" aria-controls="navigation"
  52. aria-pressed="false" aria-expanded="false" role="button" aria-label="Menu" />
  53. <nav class="nav-content" role="navigation">
  54. <label for="menuToggler" class="toggler__label">
  55. <span></span>
  56. </label>
  57. <span class="nav-items-wrapper">
  58. <a href="https://www.python.org/" class="nav-logo">
  59. <img src="../_static/py.svg" alt="Python logo"/>
  60. </a>
  61. <span class="version_switcher_placeholder"></span>
  62. <form role="search" class="search" action="../search.html" method="get">
  63. <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" class="search-icon">
  64. <path fill-rule="nonzero" fill="currentColor" d="M15.5 14h-.79l-.28-.27a6.5 6.5 0 001.48-5.34c-.47-2.78-2.79-5-5.59-5.34a6.505 6.505 0 00-7.27 7.27c.34 2.8 2.56 5.12 5.34 5.59a6.5 6.5 0 005.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path>
  65. </svg>
  66. <input placeholder="Quick search" aria-label="Quick search" type="search" name="q" />
  67. <input type="submit" value="Go"/>
  68. </form>
  69. </span>
  70. </nav>
  71. <div class="menu-wrapper">
  72. <nav class="menu" role="navigation" aria-label="main navigation">
  73. <div class="language_switcher_placeholder"></div>
  74. <label class="theme-selector-label">
  75. Theme
  76. <select class="theme-selector" oninput="activateTheme(this.value)">
  77. <option value="auto" selected>Auto</option>
  78. <option value="light">Light</option>
  79. <option value="dark">Dark</option>
  80. </select>
  81. </label>
  82. <div>
  83. <h3><a href="../contents.html">Table of Contents</a></h3>
  84. <ul>
  85. <li><a class="reference internal" href="#"><code class="xref py py-mod docutils literal notranslate"><span class="pre">msilib</span></code> — Read and write Microsoft Installer files</a><ul>
  86. <li><a class="reference internal" href="#database-objects">Database Objects</a></li>
  87. <li><a class="reference internal" href="#view-objects">View Objects</a></li>
  88. <li><a class="reference internal" href="#summary-information-objects">Summary Information Objects</a></li>
  89. <li><a class="reference internal" href="#record-objects">Record Objects</a></li>
  90. <li><a class="reference internal" href="#errors">Errors</a></li>
  91. <li><a class="reference internal" href="#cab-objects">CAB Objects</a></li>
  92. <li><a class="reference internal" href="#directory-objects">Directory Objects</a></li>
  93. <li><a class="reference internal" href="#features">Features</a></li>
  94. <li><a class="reference internal" href="#gui-classes">GUI classes</a></li>
  95. <li><a class="reference internal" href="#precomputed-tables">Precomputed tables</a></li>
  96. </ul>
  97. </li>
  98. </ul>
  99. </div>
  100. <div>
  101. <h4>Previous topic</h4>
  102. <p class="topless"><a href="mailcap.html"
  103. title="previous chapter"><code class="xref py py-mod docutils literal notranslate"><span class="pre">mailcap</span></code> — Mailcap file handling</a></p>
  104. </div>
  105. <div>
  106. <h4>Next topic</h4>
  107. <p class="topless"><a href="nis.html"
  108. title="next chapter"><code class="xref py py-mod docutils literal notranslate"><span class="pre">nis</span></code> — Interface to Sun’s NIS (Yellow Pages)</a></p>
  109. </div>
  110. <div role="note" aria-label="source link">
  111. <h3>This Page</h3>
  112. <ul class="this-page-menu">
  113. <li><a href="../bugs.html">Report a Bug</a></li>
  114. <li>
  115. <a href="https://github.com/python/cpython/blob/main/Doc/library/msilib.rst"
  116. rel="nofollow">Show Source
  117. </a>
  118. </li>
  119. </ul>
  120. </div>
  121. </nav>
  122. </div>
  123. </div>
  124. <div class="related" role="navigation" aria-label="related navigation">
  125. <h3>Navigation</h3>
  126. <ul>
  127. <li class="right" style="margin-right: 10px">
  128. <a href="../genindex.html" title="General Index"
  129. accesskey="I">index</a></li>
  130. <li class="right" >
  131. <a href="../py-modindex.html" title="Python Module Index"
  132. >modules</a> |</li>
  133. <li class="right" >
  134. <a href="nis.html" title="nis — Interface to Sun’s NIS (Yellow Pages)"
  135. accesskey="N">next</a> |</li>
  136. <li class="right" >
  137. <a href="mailcap.html" title="mailcap — Mailcap file handling"
  138. accesskey="P">previous</a> |</li>
  139. <li><img src="../_static/py.svg" alt="Python logo" style="vertical-align: middle; margin-top: -1px"/></li>
  140. <li><a href="https://www.python.org/">Python</a> &#187;</li>
  141. <li class="switchers">
  142. <div class="language_switcher_placeholder"></div>
  143. <div class="version_switcher_placeholder"></div>
  144. </li>
  145. <li>
  146. </li>
  147. <li id="cpython-language-and-version">
  148. <a href="../index.html">3.12.3 Documentation</a> &#187;
  149. </li>
  150. <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &#187;</li>
  151. <li class="nav-item nav-item-2"><a href="superseded.html" accesskey="U">Superseded Modules</a> &#187;</li>
  152. <li class="nav-item nav-item-this"><a href=""><code class="xref py py-mod docutils literal notranslate"><span class="pre">msilib</span></code> — Read and write Microsoft Installer files</a></li>
  153. <li class="right">
  154. <div class="inline-search" role="search">
  155. <form class="inline-search" action="../search.html" method="get">
  156. <input placeholder="Quick search" aria-label="Quick search" type="search" name="q" id="search-box" />
  157. <input type="submit" value="Go" />
  158. </form>
  159. </div>
  160. |
  161. </li>
  162. <li class="right">
  163. <label class="theme-selector-label">
  164. Theme
  165. <select class="theme-selector" oninput="activateTheme(this.value)">
  166. <option value="auto" selected>Auto</option>
  167. <option value="light">Light</option>
  168. <option value="dark">Dark</option>
  169. </select>
  170. </label> |</li>
  171. </ul>
  172. </div>
  173. <div class="document">
  174. <div class="documentwrapper">
  175. <div class="bodywrapper">
  176. <div class="body" role="main">
  177. <section id="module-msilib">
  178. <span id="msilib-read-and-write-microsoft-installer-files"></span><h1><a class="reference internal" href="#module-msilib" title="msilib: Creation of Microsoft Installer files, and CAB files. (deprecated) (Windows)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">msilib</span></code></a> — Read and write Microsoft Installer files<a class="headerlink" href="#module-msilib" title="Link to this heading">¶</a></h1>
  179. <p><strong>Source code:</strong> <a class="reference external" href="https://github.com/python/cpython/tree/3.12/Lib/msilib/__init__.py">Lib/msilib/__init__.py</a></p>
  180. <div class="deprecated-removed" id="index-0">
  181. <p><span class="versionmodified">Deprecated since version 3.11, will be removed in version 3.13: </span>The <a class="reference internal" href="#module-msilib" title="msilib: Creation of Microsoft Installer files, and CAB files. (deprecated) (Windows)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">msilib</span></code></a> module is deprecated
  182. (see <span class="target" id="index-1"></span><a class="pep reference external" href="https://peps.python.org/pep-0594/#msilib"><strong>PEP 594</strong></a> for details).</p>
  183. </div>
  184. <hr class="docutils" />
  185. <p>The <a class="reference internal" href="#module-msilib" title="msilib: Creation of Microsoft Installer files, and CAB files. (deprecated) (Windows)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">msilib</span></code></a> supports the creation of Microsoft Installer (<code class="docutils literal notranslate"><span class="pre">.msi</span></code>) files.
  186. Because these files often contain an embedded “cabinet” file (<code class="docutils literal notranslate"><span class="pre">.cab</span></code>), it also
  187. exposes an API to create CAB files. Support for reading <code class="docutils literal notranslate"><span class="pre">.cab</span></code> files is
  188. currently not implemented; read support for the <code class="docutils literal notranslate"><span class="pre">.msi</span></code> database is possible.</p>
  189. <p>This package aims to provide complete access to all tables in an <code class="docutils literal notranslate"><span class="pre">.msi</span></code> file,
  190. therefore, it is a fairly low-level API. One primary application of this
  191. package is the creation of Python installer package itself (although that currently
  192. uses a different version of <code class="docutils literal notranslate"><span class="pre">msilib</span></code>).</p>
  193. <p>The package contents can be roughly split into four parts: low-level CAB
  194. routines, low-level MSI routines, higher-level MSI routines, and standard table
  195. structures.</p>
  196. <dl class="py function">
  197. <dt class="sig sig-object py" id="msilib.FCICreate">
  198. <span class="sig-prename descclassname"><span class="pre">msilib.</span></span><span class="sig-name descname"><span class="pre">FCICreate</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cabname</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">files</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.FCICreate" title="Link to this definition">¶</a></dt>
  199. <dd><p>Create a new CAB file named <em>cabname</em>. <em>files</em> must be a list of tuples, each
  200. containing the name of the file on disk, and the name of the file inside the CAB
  201. file.</p>
  202. <p>The files are added to the CAB file in the order they appear in the list. All
  203. files are added into a single CAB file, using the MSZIP compression algorithm.</p>
  204. <p>Callbacks to Python for the various steps of MSI creation are currently not
  205. exposed.</p>
  206. </dd></dl>
  207. <dl class="py function">
  208. <dt class="sig sig-object py" id="msilib.UuidCreate">
  209. <span class="sig-prename descclassname"><span class="pre">msilib.</span></span><span class="sig-name descname"><span class="pre">UuidCreate</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#msilib.UuidCreate" title="Link to this definition">¶</a></dt>
  210. <dd><p>Return the string representation of a new unique identifier. This wraps the
  211. Windows API functions <code class="xref c c-func docutils literal notranslate"><span class="pre">UuidCreate()</span></code> and <code class="xref c c-func docutils literal notranslate"><span class="pre">UuidToString()</span></code>.</p>
  212. </dd></dl>
  213. <dl class="py function">
  214. <dt class="sig sig-object py" id="msilib.OpenDatabase">
  215. <span class="sig-prename descclassname"><span class="pre">msilib.</span></span><span class="sig-name descname"><span class="pre">OpenDatabase</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">persist</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.OpenDatabase" title="Link to this definition">¶</a></dt>
  216. <dd><p>Return a new database object by calling MsiOpenDatabase. <em>path</em> is the file
  217. name of the MSI file; <em>persist</em> can be one of the constants
  218. <code class="docutils literal notranslate"><span class="pre">MSIDBOPEN_CREATEDIRECT</span></code>, <code class="docutils literal notranslate"><span class="pre">MSIDBOPEN_CREATE</span></code>, <code class="docutils literal notranslate"><span class="pre">MSIDBOPEN_DIRECT</span></code>,
  219. <code class="docutils literal notranslate"><span class="pre">MSIDBOPEN_READONLY</span></code>, or <code class="docutils literal notranslate"><span class="pre">MSIDBOPEN_TRANSACT</span></code>, and may include the flag
  220. <code class="docutils literal notranslate"><span class="pre">MSIDBOPEN_PATCHFILE</span></code>. See the Microsoft documentation for the meaning of
  221. these flags; depending on the flags, an existing database is opened, or a new
  222. one created.</p>
  223. </dd></dl>
  224. <dl class="py function">
  225. <dt class="sig sig-object py" id="msilib.CreateRecord">
  226. <span class="sig-prename descclassname"><span class="pre">msilib.</span></span><span class="sig-name descname"><span class="pre">CreateRecord</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">count</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.CreateRecord" title="Link to this definition">¶</a></dt>
  227. <dd><p>Return a new record object by calling <code class="xref c c-func docutils literal notranslate"><span class="pre">MSICreateRecord()</span></code>. <em>count</em> is the
  228. number of fields of the record.</p>
  229. </dd></dl>
  230. <dl class="py function">
  231. <dt class="sig sig-object py" id="msilib.init_database">
  232. <span class="sig-prename descclassname"><span class="pre">msilib.</span></span><span class="sig-name descname"><span class="pre">init_database</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">schema</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ProductName</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ProductCode</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ProductVersion</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">Manufacturer</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.init_database" title="Link to this definition">¶</a></dt>
  233. <dd><p>Create and return a new database <em>name</em>, initialize it with <em>schema</em>, and set
  234. the properties <em>ProductName</em>, <em>ProductCode</em>, <em>ProductVersion</em>, and
  235. <em>Manufacturer</em>.</p>
  236. <p><em>schema</em> must be a module object containing <code class="docutils literal notranslate"><span class="pre">tables</span></code> and
  237. <code class="docutils literal notranslate"><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 notranslate"><span class="pre">msilib.schema</span></code></a> should be
  238. used.</p>
  239. <p>The database will contain just the schema and the validation records when this
  240. function returns.</p>
  241. </dd></dl>
  242. <dl class="py function">
  243. <dt class="sig sig-object py" id="msilib.add_data">
  244. <span class="sig-prename descclassname"><span class="pre">msilib.</span></span><span class="sig-name descname"><span class="pre">add_data</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">database</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">table</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">records</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.add_data" title="Link to this definition">¶</a></dt>
  245. <dd><p>Add all <em>records</em> to the table named <em>table</em> in <em>database</em>.</p>
  246. <p>The <em>table</em> argument must be one of the predefined tables in the MSI schema,
  247. e.g. <code class="docutils literal notranslate"><span class="pre">'Feature'</span></code>, <code class="docutils literal notranslate"><span class="pre">'File'</span></code>, <code class="docutils literal notranslate"><span class="pre">'Component'</span></code>, <code class="docutils literal notranslate"><span class="pre">'Dialog'</span></code>, <code class="docutils literal notranslate"><span class="pre">'Control'</span></code>,
  248. etc.</p>
  249. <p><em>records</em> should be a list of tuples, each one containing all fields of a
  250. record according to the schema of the table. For optional fields,
  251. <code class="docutils literal notranslate"><span class="pre">None</span></code> can be passed.</p>
  252. <p>Field values can be ints, strings, or instances of the Binary class.</p>
  253. </dd></dl>
  254. <dl class="py class">
  255. <dt class="sig sig-object py" id="msilib.Binary">
  256. <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">msilib.</span></span><span class="sig-name descname"><span class="pre">Binary</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">filename</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Binary" title="Link to this definition">¶</a></dt>
  257. <dd><p>Represents entries in the Binary table; inserting such an object using
  258. <a class="reference internal" href="#msilib.add_data" title="msilib.add_data"><code class="xref py py-func docutils literal notranslate"><span class="pre">add_data()</span></code></a> reads the file named <em>filename</em> into the table.</p>
  259. </dd></dl>
  260. <dl class="py function">
  261. <dt class="sig sig-object py" id="msilib.add_tables">
  262. <span class="sig-prename descclassname"><span class="pre">msilib.</span></span><span class="sig-name descname"><span class="pre">add_tables</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">database</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">module</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.add_tables" title="Link to this definition">¶</a></dt>
  263. <dd><p>Add all table content from <em>module</em> to <em>database</em>. <em>module</em> must contain an
  264. attribute <em>tables</em> listing all tables for which content should be added, and one
  265. attribute per table that has the actual content.</p>
  266. <p>This is typically used to install the sequence tables.</p>
  267. </dd></dl>
  268. <dl class="py function">
  269. <dt class="sig sig-object py" id="msilib.add_stream">
  270. <span class="sig-prename descclassname"><span class="pre">msilib.</span></span><span class="sig-name descname"><span class="pre">add_stream</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">database</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">path</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.add_stream" title="Link to this definition">¶</a></dt>
  271. <dd><p>Add the file <em>path</em> into the <code class="docutils literal notranslate"><span class="pre">_Stream</span></code> table of <em>database</em>, with the stream
  272. name <em>name</em>.</p>
  273. </dd></dl>
  274. <dl class="py function">
  275. <dt class="sig sig-object py" id="msilib.gen_uuid">
  276. <span class="sig-prename descclassname"><span class="pre">msilib.</span></span><span class="sig-name descname"><span class="pre">gen_uuid</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#msilib.gen_uuid" title="Link to this definition">¶</a></dt>
  277. <dd><p>Return a new UUID, in the format that MSI typically requires (i.e. in curly
  278. braces, and with all hexdigits in uppercase).</p>
  279. </dd></dl>
  280. <div class="admonition seealso">
  281. <p class="admonition-title">See also</p>
  282. <p><a class="reference external" href="https://msdn.microsoft.com/en-us/library/bb432265.aspx">FCICreate</a>
  283. <a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa379205.aspx">UuidCreate</a>
  284. <a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa379352.aspx">UuidToString</a></p>
  285. </div>
  286. <section id="database-objects">
  287. <span id="id1"></span><h2>Database Objects<a class="headerlink" href="#database-objects" title="Link to this heading">¶</a></h2>
  288. <dl class="py method">
  289. <dt class="sig sig-object py" id="msilib.Database.OpenView">
  290. <span class="sig-prename descclassname"><span class="pre">Database.</span></span><span class="sig-name descname"><span class="pre">OpenView</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">sql</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Database.OpenView" title="Link to this definition">¶</a></dt>
  291. <dd><p>Return a view object, by calling <code class="xref c c-func docutils literal notranslate"><span class="pre">MSIDatabaseOpenView()</span></code>. <em>sql</em> is the SQL
  292. statement to execute.</p>
  293. </dd></dl>
  294. <dl class="py method">
  295. <dt class="sig sig-object py" id="msilib.Database.Commit">
  296. <span class="sig-prename descclassname"><span class="pre">Database.</span></span><span class="sig-name descname"><span class="pre">Commit</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Database.Commit" title="Link to this definition">¶</a></dt>
  297. <dd><p>Commit the changes pending in the current transaction, by calling
  298. <code class="xref c c-func docutils literal notranslate"><span class="pre">MSIDatabaseCommit()</span></code>.</p>
  299. </dd></dl>
  300. <dl class="py method">
  301. <dt class="sig sig-object py" id="msilib.Database.GetSummaryInformation">
  302. <span class="sig-prename descclassname"><span class="pre">Database.</span></span><span class="sig-name descname"><span class="pre">GetSummaryInformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">count</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Database.GetSummaryInformation" title="Link to this definition">¶</a></dt>
  303. <dd><p>Return a new summary information object, by calling
  304. <code class="xref c c-func docutils literal notranslate"><span class="pre">MsiGetSummaryInformation()</span></code>. <em>count</em> is the maximum number of updated
  305. values.</p>
  306. </dd></dl>
  307. <dl class="py method">
  308. <dt class="sig sig-object py" id="msilib.Database.Close">
  309. <span class="sig-prename descclassname"><span class="pre">Database.</span></span><span class="sig-name descname"><span class="pre">Close</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Database.Close" title="Link to this definition">¶</a></dt>
  310. <dd><p>Close the database object, through <code class="xref c c-func docutils literal notranslate"><span class="pre">MsiCloseHandle()</span></code>.</p>
  311. <div class="versionadded">
  312. <p><span class="versionmodified added">New in version 3.7.</span></p>
  313. </div>
  314. </dd></dl>
  315. <div class="admonition seealso">
  316. <p class="admonition-title">See also</p>
  317. <p><a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa370082.aspx">MSIDatabaseOpenView</a>
  318. <a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa370075.aspx">MSIDatabaseCommit</a>
  319. <a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa370301.aspx">MSIGetSummaryInformation</a>
  320. <a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa370067.aspx">MsiCloseHandle</a></p>
  321. </div>
  322. </section>
  323. <section id="view-objects">
  324. <span id="id2"></span><h2>View Objects<a class="headerlink" href="#view-objects" title="Link to this heading">¶</a></h2>
  325. <dl class="py method">
  326. <dt class="sig sig-object py" id="msilib.View.Execute">
  327. <span class="sig-prename descclassname"><span class="pre">View.</span></span><span class="sig-name descname"><span class="pre">Execute</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">params</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.View.Execute" title="Link to this definition">¶</a></dt>
  328. <dd><p>Execute the SQL query of the view, through <code class="xref c c-func docutils literal notranslate"><span class="pre">MSIViewExecute()</span></code>. If
  329. <em>params</em> is not <code class="docutils literal notranslate"><span class="pre">None</span></code>, it is a record describing actual values of the
  330. parameter tokens in the query.</p>
  331. </dd></dl>
  332. <dl class="py method">
  333. <dt class="sig sig-object py" id="msilib.View.GetColumnInfo">
  334. <span class="sig-prename descclassname"><span class="pre">View.</span></span><span class="sig-name descname"><span class="pre">GetColumnInfo</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">kind</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.View.GetColumnInfo" title="Link to this definition">¶</a></dt>
  335. <dd><p>Return a record describing the columns of the view, through calling
  336. <code class="xref c c-func docutils literal notranslate"><span class="pre">MsiViewGetColumnInfo()</span></code>. <em>kind</em> can be either <code class="docutils literal notranslate"><span class="pre">MSICOLINFO_NAMES</span></code> or
  337. <code class="docutils literal notranslate"><span class="pre">MSICOLINFO_TYPES</span></code>.</p>
  338. </dd></dl>
  339. <dl class="py method">
  340. <dt class="sig sig-object py" id="msilib.View.Fetch">
  341. <span class="sig-prename descclassname"><span class="pre">View.</span></span><span class="sig-name descname"><span class="pre">Fetch</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#msilib.View.Fetch" title="Link to this definition">¶</a></dt>
  342. <dd><p>Return a result record of the query, through calling <code class="xref c c-func docutils literal notranslate"><span class="pre">MsiViewFetch()</span></code>.</p>
  343. </dd></dl>
  344. <dl class="py method">
  345. <dt class="sig sig-object py" id="msilib.View.Modify">
  346. <span class="sig-prename descclassname"><span class="pre">View.</span></span><span class="sig-name descname"><span class="pre">Modify</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">kind</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.View.Modify" title="Link to this definition">¶</a></dt>
  347. <dd><p>Modify the view, by calling <code class="xref c c-func docutils literal notranslate"><span class="pre">MsiViewModify()</span></code>. <em>kind</em> can be one of
  348. <code class="docutils literal notranslate"><span class="pre">MSIMODIFY_SEEK</span></code>, <code class="docutils literal notranslate"><span class="pre">MSIMODIFY_REFRESH</span></code>, <code class="docutils literal notranslate"><span class="pre">MSIMODIFY_INSERT</span></code>,
  349. <code class="docutils literal notranslate"><span class="pre">MSIMODIFY_UPDATE</span></code>, <code class="docutils literal notranslate"><span class="pre">MSIMODIFY_ASSIGN</span></code>, <code class="docutils literal notranslate"><span class="pre">MSIMODIFY_REPLACE</span></code>,
  350. <code class="docutils literal notranslate"><span class="pre">MSIMODIFY_MERGE</span></code>, <code class="docutils literal notranslate"><span class="pre">MSIMODIFY_DELETE</span></code>, <code class="docutils literal notranslate"><span class="pre">MSIMODIFY_INSERT_TEMPORARY</span></code>,
  351. <code class="docutils literal notranslate"><span class="pre">MSIMODIFY_VALIDATE</span></code>, <code class="docutils literal notranslate"><span class="pre">MSIMODIFY_VALIDATE_NEW</span></code>,
  352. <code class="docutils literal notranslate"><span class="pre">MSIMODIFY_VALIDATE_FIELD</span></code>, or <code class="docutils literal notranslate"><span class="pre">MSIMODIFY_VALIDATE_DELETE</span></code>.</p>
  353. <p><em>data</em> must be a record describing the new data.</p>
  354. </dd></dl>
  355. <dl class="py method">
  356. <dt class="sig sig-object py" id="msilib.View.Close">
  357. <span class="sig-prename descclassname"><span class="pre">View.</span></span><span class="sig-name descname"><span class="pre">Close</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#msilib.View.Close" title="Link to this definition">¶</a></dt>
  358. <dd><p>Close the view, through <code class="xref c c-func docutils literal notranslate"><span class="pre">MsiViewClose()</span></code>.</p>
  359. </dd></dl>
  360. <div class="admonition seealso">
  361. <p class="admonition-title">See also</p>
  362. <p><a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa370513.aspx">MsiViewExecute</a>
  363. <a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa370516.aspx">MSIViewGetColumnInfo</a>
  364. <a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa370514.aspx">MsiViewFetch</a>
  365. <a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa370519.aspx">MsiViewModify</a>
  366. <a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa370510.aspx">MsiViewClose</a></p>
  367. </div>
  368. </section>
  369. <section id="summary-information-objects">
  370. <span id="summary-objects"></span><h2>Summary Information Objects<a class="headerlink" href="#summary-information-objects" title="Link to this heading">¶</a></h2>
  371. <dl class="py method">
  372. <dt class="sig sig-object py" id="msilib.SummaryInformation.GetProperty">
  373. <span class="sig-prename descclassname"><span class="pre">SummaryInformation.</span></span><span class="sig-name descname"><span class="pre">GetProperty</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">field</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.SummaryInformation.GetProperty" title="Link to this definition">¶</a></dt>
  374. <dd><p>Return a property of the summary, through <code class="xref c c-func docutils literal notranslate"><span class="pre">MsiSummaryInfoGetProperty()</span></code>.
  375. <em>field</em> is the name of the property, and can be one of the constants
  376. <code class="docutils literal notranslate"><span class="pre">PID_CODEPAGE</span></code>, <code class="docutils literal notranslate"><span class="pre">PID_TITLE</span></code>, <code class="docutils literal notranslate"><span class="pre">PID_SUBJECT</span></code>, <code class="docutils literal notranslate"><span class="pre">PID_AUTHOR</span></code>,
  377. <code class="docutils literal notranslate"><span class="pre">PID_KEYWORDS</span></code>, <code class="docutils literal notranslate"><span class="pre">PID_COMMENTS</span></code>, <code class="docutils literal notranslate"><span class="pre">PID_TEMPLATE</span></code>, <code class="docutils literal notranslate"><span class="pre">PID_LASTAUTHOR</span></code>,
  378. <code class="docutils literal notranslate"><span class="pre">PID_REVNUMBER</span></code>, <code class="docutils literal notranslate"><span class="pre">PID_LASTPRINTED</span></code>, <code class="docutils literal notranslate"><span class="pre">PID_CREATE_DTM</span></code>,
  379. <code class="docutils literal notranslate"><span class="pre">PID_LASTSAVE_DTM</span></code>, <code class="docutils literal notranslate"><span class="pre">PID_PAGECOUNT</span></code>, <code class="docutils literal notranslate"><span class="pre">PID_WORDCOUNT</span></code>, <code class="docutils literal notranslate"><span class="pre">PID_CHARCOUNT</span></code>,
  380. <code class="docutils literal notranslate"><span class="pre">PID_APPNAME</span></code>, or <code class="docutils literal notranslate"><span class="pre">PID_SECURITY</span></code>.</p>
  381. </dd></dl>
  382. <dl class="py method">
  383. <dt class="sig sig-object py" id="msilib.SummaryInformation.GetPropertyCount">
  384. <span class="sig-prename descclassname"><span class="pre">SummaryInformation.</span></span><span class="sig-name descname"><span class="pre">GetPropertyCount</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#msilib.SummaryInformation.GetPropertyCount" title="Link to this definition">¶</a></dt>
  385. <dd><p>Return the number of summary properties, through
  386. <code class="xref c c-func docutils literal notranslate"><span class="pre">MsiSummaryInfoGetPropertyCount()</span></code>.</p>
  387. </dd></dl>
  388. <dl class="py method">
  389. <dt class="sig sig-object py" id="msilib.SummaryInformation.SetProperty">
  390. <span class="sig-prename descclassname"><span class="pre">SummaryInformation.</span></span><span class="sig-name descname"><span class="pre">SetProperty</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">field</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">value</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.SummaryInformation.SetProperty" title="Link to this definition">¶</a></dt>
  391. <dd><p>Set a property through <code class="xref c c-func docutils literal notranslate"><span class="pre">MsiSummaryInfoSetProperty()</span></code>. <em>field</em> can have the
  392. same values as in <a class="reference internal" href="#msilib.SummaryInformation.GetProperty" title="msilib.SummaryInformation.GetProperty"><code class="xref py py-meth docutils literal notranslate"><span class="pre">GetProperty()</span></code></a>, <em>value</em> is the new value of the property.
  393. Possible value types are integer and string.</p>
  394. </dd></dl>
  395. <dl class="py method">
  396. <dt class="sig sig-object py" id="msilib.SummaryInformation.Persist">
  397. <span class="sig-prename descclassname"><span class="pre">SummaryInformation.</span></span><span class="sig-name descname"><span class="pre">Persist</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#msilib.SummaryInformation.Persist" title="Link to this definition">¶</a></dt>
  398. <dd><p>Write the modified properties to the summary information stream, using
  399. <code class="xref c c-func docutils literal notranslate"><span class="pre">MsiSummaryInfoPersist()</span></code>.</p>
  400. </dd></dl>
  401. <div class="admonition seealso">
  402. <p class="admonition-title">See also</p>
  403. <p><a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa370409.aspx">MsiSummaryInfoGetProperty</a>
  404. <a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa370488.aspx">MsiSummaryInfoGetPropertyCount</a>
  405. <a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa370491.aspx">MsiSummaryInfoSetProperty</a>
  406. <a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa370490.aspx">MsiSummaryInfoPersist</a></p>
  407. </div>
  408. </section>
  409. <section id="record-objects">
  410. <span id="id3"></span><h2>Record Objects<a class="headerlink" href="#record-objects" title="Link to this heading">¶</a></h2>
  411. <dl class="py method">
  412. <dt class="sig sig-object py" id="msilib.Record.GetFieldCount">
  413. <span class="sig-prename descclassname"><span class="pre">Record.</span></span><span class="sig-name descname"><span class="pre">GetFieldCount</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Record.GetFieldCount" title="Link to this definition">¶</a></dt>
  414. <dd><p>Return the number of fields of the record, through
  415. <code class="xref c c-func docutils literal notranslate"><span class="pre">MsiRecordGetFieldCount()</span></code>.</p>
  416. </dd></dl>
  417. <dl class="py method">
  418. <dt class="sig sig-object py" id="msilib.Record.GetInteger">
  419. <span class="sig-prename descclassname"><span class="pre">Record.</span></span><span class="sig-name descname"><span class="pre">GetInteger</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">field</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Record.GetInteger" title="Link to this definition">¶</a></dt>
  420. <dd><p>Return the value of <em>field</em> as an integer where possible. <em>field</em> must
  421. be an integer.</p>
  422. </dd></dl>
  423. <dl class="py method">
  424. <dt class="sig sig-object py" id="msilib.Record.GetString">
  425. <span class="sig-prename descclassname"><span class="pre">Record.</span></span><span class="sig-name descname"><span class="pre">GetString</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">field</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Record.GetString" title="Link to this definition">¶</a></dt>
  426. <dd><p>Return the value of <em>field</em> as a string where possible. <em>field</em> must
  427. be an integer.</p>
  428. </dd></dl>
  429. <dl class="py method">
  430. <dt class="sig sig-object py" id="msilib.Record.SetString">
  431. <span class="sig-prename descclassname"><span class="pre">Record.</span></span><span class="sig-name descname"><span class="pre">SetString</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">field</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">value</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Record.SetString" title="Link to this definition">¶</a></dt>
  432. <dd><p>Set <em>field</em> to <em>value</em> through <code class="xref c c-func docutils literal notranslate"><span class="pre">MsiRecordSetString()</span></code>. <em>field</em> must be an
  433. integer; <em>value</em> a string.</p>
  434. </dd></dl>
  435. <dl class="py method">
  436. <dt class="sig sig-object py" id="msilib.Record.SetStream">
  437. <span class="sig-prename descclassname"><span class="pre">Record.</span></span><span class="sig-name descname"><span class="pre">SetStream</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">field</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">value</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Record.SetStream" title="Link to this definition">¶</a></dt>
  438. <dd><p>Set <em>field</em> to the contents of the file named <em>value</em>, through
  439. <code class="xref c c-func docutils literal notranslate"><span class="pre">MsiRecordSetStream()</span></code>. <em>field</em> must be an integer; <em>value</em> a string.</p>
  440. </dd></dl>
  441. <dl class="py method">
  442. <dt class="sig sig-object py" id="msilib.Record.SetInteger">
  443. <span class="sig-prename descclassname"><span class="pre">Record.</span></span><span class="sig-name descname"><span class="pre">SetInteger</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">field</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">value</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Record.SetInteger" title="Link to this definition">¶</a></dt>
  444. <dd><p>Set <em>field</em> to <em>value</em> through <code class="xref c c-func docutils literal notranslate"><span class="pre">MsiRecordSetInteger()</span></code>. Both <em>field</em> and
  445. <em>value</em> must be an integer.</p>
  446. </dd></dl>
  447. <dl class="py method">
  448. <dt class="sig sig-object py" id="msilib.Record.ClearData">
  449. <span class="sig-prename descclassname"><span class="pre">Record.</span></span><span class="sig-name descname"><span class="pre">ClearData</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Record.ClearData" title="Link to this definition">¶</a></dt>
  450. <dd><p>Set all fields of the record to 0, through <code class="xref c c-func docutils literal notranslate"><span class="pre">MsiRecordClearData()</span></code>.</p>
  451. </dd></dl>
  452. <div class="admonition seealso">
  453. <p class="admonition-title">See also</p>
  454. <p><a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa370366.aspx">MsiRecordGetFieldCount</a>
  455. <a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa370373.aspx">MsiRecordSetString</a>
  456. <a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa370372.aspx">MsiRecordSetStream</a>
  457. <a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa370371.aspx">MsiRecordSetInteger</a>
  458. <a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa370364.aspx">MsiRecordClearData</a></p>
  459. </div>
  460. </section>
  461. <section id="errors">
  462. <span id="msi-errors"></span><h2>Errors<a class="headerlink" href="#errors" title="Link to this heading">¶</a></h2>
  463. <p>All wrappers around MSI functions raise <code class="xref py py-exc docutils literal notranslate"><span class="pre">MSIError</span></code>; the string inside the
  464. exception will contain more detail.</p>
  465. </section>
  466. <section id="cab-objects">
  467. <span id="cab"></span><h2>CAB Objects<a class="headerlink" href="#cab-objects" title="Link to this heading">¶</a></h2>
  468. <dl class="py class">
  469. <dt class="sig sig-object py" id="msilib.CAB">
  470. <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">msilib.</span></span><span class="sig-name descname"><span class="pre">CAB</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.CAB" title="Link to this definition">¶</a></dt>
  471. <dd><p>The class <a class="reference internal" href="#msilib.CAB" title="msilib.CAB"><code class="xref py py-class docutils literal notranslate"><span class="pre">CAB</span></code></a> represents a CAB file. During MSI construction, files
  472. will be added simultaneously to the <code class="docutils literal notranslate"><span class="pre">Files</span></code> table, and to a CAB file. Then,
  473. when all files have been added, the CAB file can be written, then added to the
  474. MSI file.</p>
  475. <p><em>name</em> is the name of the CAB file in the MSI file.</p>
  476. <dl class="py method">
  477. <dt class="sig sig-object py" id="msilib.CAB.append">
  478. <span class="sig-name descname"><span class="pre">append</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">full</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">file</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">logical</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.CAB.append" title="Link to this definition">¶</a></dt>
  479. <dd><p>Add the file with the pathname <em>full</em> to the CAB file, under the name
  480. <em>logical</em>. If there is already a file named <em>logical</em>, a new file name is
  481. created.</p>
  482. <p>Return the index of the file in the CAB file, and the new name of the file
  483. inside the CAB file.</p>
  484. </dd></dl>
  485. <dl class="py method">
  486. <dt class="sig sig-object py" id="msilib.CAB.commit">
  487. <span class="sig-name descname"><span class="pre">commit</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">database</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.CAB.commit" title="Link to this definition">¶</a></dt>
  488. <dd><p>Generate a CAB file, add it as a stream to the MSI file, put it into the
  489. <code class="docutils literal notranslate"><span class="pre">Media</span></code> table, and remove the generated file from the disk.</p>
  490. </dd></dl>
  491. </dd></dl>
  492. </section>
  493. <section id="directory-objects">
  494. <span id="msi-directory"></span><h2>Directory Objects<a class="headerlink" href="#directory-objects" title="Link to this heading">¶</a></h2>
  495. <dl class="py class">
  496. <dt class="sig sig-object py" id="msilib.Directory">
  497. <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">msilib.</span></span><span class="sig-name descname"><span class="pre">Directory</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">database</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cab</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">basedir</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">physical</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">logical</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">default</span></span></em><span class="optional">[</span>, <em class="sig-param"><span class="n"><span class="pre">componentflags</span></span></em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Directory" title="Link to this definition">¶</a></dt>
  498. <dd><p>Create a new directory in the Directory table. There is a current component at
  499. each point in time for the directory, which is either explicitly created through
  500. <a class="reference internal" href="#msilib.Directory.start_component" title="msilib.Directory.start_component"><code class="xref py py-meth docutils literal notranslate"><span class="pre">start_component()</span></code></a>, or implicitly when files are added for the first time.
  501. Files are added into the current component, and into the cab file. To create a
  502. directory, a base directory object needs to be specified (can be <code class="docutils literal notranslate"><span class="pre">None</span></code>), the
  503. path to the physical directory, and a logical directory name. <em>default</em>
  504. specifies the DefaultDir slot in the directory table. <em>componentflags</em> specifies
  505. the default flags that new components get.</p>
  506. <dl class="py method">
  507. <dt class="sig sig-object py" id="msilib.Directory.start_component">
  508. <span class="sig-name descname"><span class="pre">start_component</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">component</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">feature</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">flags</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">keyfile</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">uuid</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Directory.start_component" title="Link to this definition">¶</a></dt>
  509. <dd><p>Add an entry to the Component table, and make this component the current
  510. component for this directory. If no component name is given, the directory
  511. name is used. If no <em>feature</em> is given, the current feature is used. If no
  512. <em>flags</em> are given, the directory’s default flags are used. If no <em>keyfile</em>
  513. is given, the KeyPath is left null in the Component table.</p>
  514. </dd></dl>
  515. <dl class="py method">
  516. <dt class="sig sig-object py" id="msilib.Directory.add_file">
  517. <span class="sig-name descname"><span class="pre">add_file</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">file</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">src</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">version</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">language</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Directory.add_file" title="Link to this definition">¶</a></dt>
  518. <dd><p>Add a file to the current component of the directory, starting a new one
  519. if there is no current component. By default, the file name in the source
  520. and the file table will be identical. If the <em>src</em> file is specified, it
  521. is interpreted relative to the current directory. Optionally, a <em>version</em>
  522. and a <em>language</em> can be specified for the entry in the File table.</p>
  523. </dd></dl>
  524. <dl class="py method">
  525. <dt class="sig sig-object py" id="msilib.Directory.glob">
  526. <span class="sig-name descname"><span class="pre">glob</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">pattern</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">exclude</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Directory.glob" title="Link to this definition">¶</a></dt>
  527. <dd><p>Add a list of files to the current component as specified in the glob
  528. pattern. Individual files can be excluded in the <em>exclude</em> list.</p>
  529. </dd></dl>
  530. <dl class="py method">
  531. <dt class="sig sig-object py" id="msilib.Directory.remove_pyc">
  532. <span class="sig-name descname"><span class="pre">remove_pyc</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Directory.remove_pyc" title="Link to this definition">¶</a></dt>
  533. <dd><p>Remove <code class="docutils literal notranslate"><span class="pre">.pyc</span></code> files on uninstall.</p>
  534. </dd></dl>
  535. </dd></dl>
  536. <div class="admonition seealso">
  537. <p class="admonition-title">See also</p>
  538. <p><a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa368295.aspx">Directory Table</a>
  539. <a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa368596.aspx">File Table</a>
  540. <a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa368007.aspx">Component Table</a>
  541. <a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa368579.aspx">FeatureComponents Table</a></p>
  542. </div>
  543. </section>
  544. <section id="features">
  545. <span id="id4"></span><h2>Features<a class="headerlink" href="#features" title="Link to this heading">¶</a></h2>
  546. <dl class="py class">
  547. <dt class="sig sig-object py" id="msilib.Feature">
  548. <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">msilib.</span></span><span class="sig-name descname"><span class="pre">Feature</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">db</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">id</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">title</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">desc</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">display</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">level</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">parent</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">directory</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">attributes</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Feature" title="Link to this definition">¶</a></dt>
  549. <dd><p>Add a new record to the <code class="docutils literal notranslate"><span class="pre">Feature</span></code> table, using the values <em>id</em>, <em>parent.id</em>,
  550. <em>title</em>, <em>desc</em>, <em>display</em>, <em>level</em>, <em>directory</em>, and <em>attributes</em>. The
  551. resulting feature object can be passed to the <code class="xref py py-meth docutils literal notranslate"><span class="pre">start_component()</span></code> method of
  552. <a class="reference internal" href="#msilib.Directory" title="msilib.Directory"><code class="xref py py-class docutils literal notranslate"><span class="pre">Directory</span></code></a>.</p>
  553. <dl class="py method">
  554. <dt class="sig sig-object py" id="msilib.Feature.set_current">
  555. <span class="sig-name descname"><span class="pre">set_current</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Feature.set_current" title="Link to this definition">¶</a></dt>
  556. <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. (deprecated) (Windows)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">msilib</span></code></a>. New components are
  557. automatically added to the default feature, unless a feature is explicitly
  558. specified.</p>
  559. </dd></dl>
  560. </dd></dl>
  561. <div class="admonition seealso">
  562. <p class="admonition-title">See also</p>
  563. <p><a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa368585.aspx">Feature Table</a></p>
  564. </div>
  565. </section>
  566. <section id="gui-classes">
  567. <span id="msi-gui"></span><h2>GUI classes<a class="headerlink" href="#gui-classes" title="Link to this heading">¶</a></h2>
  568. <p><a class="reference internal" href="#module-msilib" title="msilib: Creation of Microsoft Installer files, and CAB files. (deprecated) (Windows)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">msilib</span></code></a> provides several classes that wrap the GUI tables in an MSI
  569. database. However, no standard user interface is provided.</p>
  570. <dl class="py class">
  571. <dt class="sig sig-object py" id="msilib.Control">
  572. <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">msilib.</span></span><span class="sig-name descname"><span class="pre">Control</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dlg</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">name</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Control" title="Link to this definition">¶</a></dt>
  573. <dd><p>Base class of the dialog controls. <em>dlg</em> is the dialog object the control
  574. belongs to, and <em>name</em> is the control’s name.</p>
  575. <dl class="py method">
  576. <dt class="sig sig-object py" id="msilib.Control.event">
  577. <span class="sig-name descname"><span class="pre">event</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">event</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">argument</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">condition</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ordering</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Control.event" title="Link to this definition">¶</a></dt>
  578. <dd><p>Make an entry into the <code class="docutils literal notranslate"><span class="pre">ControlEvent</span></code> table for this control.</p>
  579. </dd></dl>
  580. <dl class="py method">
  581. <dt class="sig sig-object py" id="msilib.Control.mapping">
  582. <span class="sig-name descname"><span class="pre">mapping</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">event</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">attribute</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Control.mapping" title="Link to this definition">¶</a></dt>
  583. <dd><p>Make an entry into the <code class="docutils literal notranslate"><span class="pre">EventMapping</span></code> table for this control.</p>
  584. </dd></dl>
  585. <dl class="py method">
  586. <dt class="sig sig-object py" id="msilib.Control.condition">
  587. <span class="sig-name descname"><span class="pre">condition</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">action</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">condition</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Control.condition" title="Link to this definition">¶</a></dt>
  588. <dd><p>Make an entry into the <code class="docutils literal notranslate"><span class="pre">ControlCondition</span></code> table for this control.</p>
  589. </dd></dl>
  590. </dd></dl>
  591. <dl class="py class">
  592. <dt class="sig sig-object py" id="msilib.RadioButtonGroup">
  593. <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">msilib.</span></span><span class="sig-name descname"><span class="pre">RadioButtonGroup</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dlg</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">property</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.RadioButtonGroup" title="Link to this definition">¶</a></dt>
  594. <dd><p>Create a radio button control named <em>name</em>. <em>property</em> is the installer property
  595. that gets set when a radio button is selected.</p>
  596. <dl class="py method">
  597. <dt class="sig sig-object py" id="msilib.RadioButtonGroup.add">
  598. <span class="sig-name descname"><span class="pre">add</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">width</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">height</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">text</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">value</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.RadioButtonGroup.add" title="Link to this definition">¶</a></dt>
  599. <dd><p>Add a radio button named <em>name</em> to the group, at the coordinates <em>x</em>, <em>y</em>,
  600. <em>width</em>, <em>height</em>, and with the label <em>text</em>. If <em>value</em> is <code class="docutils literal notranslate"><span class="pre">None</span></code>, it
  601. defaults to <em>name</em>.</p>
  602. </dd></dl>
  603. </dd></dl>
  604. <dl class="py class">
  605. <dt class="sig sig-object py" id="msilib.Dialog">
  606. <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">msilib.</span></span><span class="sig-name descname"><span class="pre">Dialog</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">db</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">w</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">h</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">attr</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">title</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">first</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">default</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cancel</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Dialog" title="Link to this definition">¶</a></dt>
  607. <dd><p>Return a new <a class="reference internal" href="#msilib.Dialog" title="msilib.Dialog"><code class="xref py py-class docutils literal notranslate"><span class="pre">Dialog</span></code></a> object. An entry in the <code class="docutils literal notranslate"><span class="pre">Dialog</span></code> table is made,
  608. with the specified coordinates, dialog attributes, title, name of the first,
  609. default, and cancel controls.</p>
  610. <dl class="py method">
  611. <dt class="sig sig-object py" id="msilib.Dialog.control">
  612. <span class="sig-name descname"><span class="pre">control</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">type</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">width</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">height</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">attributes</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">property</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">text</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">control_next</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">help</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Dialog.control" title="Link to this definition">¶</a></dt>
  613. <dd><p>Return a new <a class="reference internal" href="#msilib.Control" title="msilib.Control"><code class="xref py py-class docutils literal notranslate"><span class="pre">Control</span></code></a> object. An entry in the <code class="docutils literal notranslate"><span class="pre">Control</span></code> table is
  614. made with the specified parameters.</p>
  615. <p>This is a generic method; for specific types, specialized methods are
  616. provided.</p>
  617. </dd></dl>
  618. <dl class="py method">
  619. <dt class="sig sig-object py" id="msilib.Dialog.text">
  620. <span class="sig-name descname"><span class="pre">text</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">width</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">height</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">attributes</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">text</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Dialog.text" title="Link to this definition">¶</a></dt>
  621. <dd><p>Add and return a <code class="docutils literal notranslate"><span class="pre">Text</span></code> control.</p>
  622. </dd></dl>
  623. <dl class="py method">
  624. <dt class="sig sig-object py" id="msilib.Dialog.bitmap">
  625. <span class="sig-name descname"><span class="pre">bitmap</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">width</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">height</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">text</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Dialog.bitmap" title="Link to this definition">¶</a></dt>
  626. <dd><p>Add and return a <code class="docutils literal notranslate"><span class="pre">Bitmap</span></code> control.</p>
  627. </dd></dl>
  628. <dl class="py method">
  629. <dt class="sig sig-object py" id="msilib.Dialog.line">
  630. <span class="sig-name descname"><span class="pre">line</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">width</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">height</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Dialog.line" title="Link to this definition">¶</a></dt>
  631. <dd><p>Add and return a <code class="docutils literal notranslate"><span class="pre">Line</span></code> control.</p>
  632. </dd></dl>
  633. <dl class="py method">
  634. <dt class="sig sig-object py" id="msilib.Dialog.pushbutton">
  635. <span class="sig-name descname"><span class="pre">pushbutton</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">width</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">height</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">attributes</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">text</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">next_control</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Dialog.pushbutton" title="Link to this definition">¶</a></dt>
  636. <dd><p>Add and return a <code class="docutils literal notranslate"><span class="pre">PushButton</span></code> control.</p>
  637. </dd></dl>
  638. <dl class="py method">
  639. <dt class="sig sig-object py" id="msilib.Dialog.radiogroup">
  640. <span class="sig-name descname"><span class="pre">radiogroup</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">width</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">height</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">attributes</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">property</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">text</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">next_control</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Dialog.radiogroup" title="Link to this definition">¶</a></dt>
  641. <dd><p>Add and return a <code class="docutils literal notranslate"><span class="pre">RadioButtonGroup</span></code> control.</p>
  642. </dd></dl>
  643. <dl class="py method">
  644. <dt class="sig sig-object py" id="msilib.Dialog.checkbox">
  645. <span class="sig-name descname"><span class="pre">checkbox</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">width</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">height</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">attributes</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">property</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">text</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">next_control</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#msilib.Dialog.checkbox" title="Link to this definition">¶</a></dt>
  646. <dd><p>Add and return a <code class="docutils literal notranslate"><span class="pre">CheckBox</span></code> control.</p>
  647. </dd></dl>
  648. </dd></dl>
  649. <div class="admonition seealso">
  650. <p class="admonition-title">See also</p>
  651. <p><a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa368286.aspx">Dialog Table</a>
  652. <a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa368044.aspx">Control Table</a>
  653. <a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa368039.aspx">Control Types</a>
  654. <a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa368035.aspx">ControlCondition Table</a>
  655. <a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa368037.aspx">ControlEvent Table</a>
  656. <a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa368559.aspx">EventMapping Table</a>
  657. <a class="reference external" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa370962.aspx">RadioButton Table</a></p>
  658. </div>
  659. </section>
  660. <section id="precomputed-tables">
  661. <span id="msi-tables"></span><h2>Precomputed tables<a class="headerlink" href="#precomputed-tables" title="Link to this heading">¶</a></h2>
  662. <p><a class="reference internal" href="#module-msilib" title="msilib: Creation of Microsoft Installer files, and CAB files. (deprecated) (Windows)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">msilib</span></code></a> provides a few subpackages that contain only schema and table
  663. definitions. Currently, these definitions are based on MSI version 2.0.</p>
  664. <dl class="py data">
  665. <dt class="sig sig-object py" id="msilib.schema">
  666. <span class="sig-prename descclassname"><span class="pre">msilib.</span></span><span class="sig-name descname"><span class="pre">schema</span></span><a class="headerlink" href="#msilib.schema" title="Link to this definition">¶</a></dt>
  667. <dd><p>This is the standard MSI schema for MSI 2.0, with the <em>tables</em> variable
  668. providing a list of table definitions, and <em>_Validation_records</em> providing the
  669. data for MSI validation.</p>
  670. </dd></dl>
  671. <dl class="py data">
  672. <dt class="sig sig-object py" id="msilib.sequence">
  673. <span class="sig-prename descclassname"><span class="pre">msilib.</span></span><span class="sig-name descname"><span class="pre">sequence</span></span><a class="headerlink" href="#msilib.sequence" title="Link to this definition">¶</a></dt>
  674. <dd><p>This module contains table contents for the standard sequence tables:
  675. <em>AdminExecuteSequence</em>, <em>AdminUISequence</em>, <em>AdvtExecuteSequence</em>,
  676. <em>InstallExecuteSequence</em>, and <em>InstallUISequence</em>.</p>
  677. </dd></dl>
  678. <dl class="py data">
  679. <dt class="sig sig-object py" id="msilib.text">
  680. <span class="sig-prename descclassname"><span class="pre">msilib.</span></span><span class="sig-name descname"><span class="pre">text</span></span><a class="headerlink" href="#msilib.text" title="Link to this definition">¶</a></dt>
  681. <dd><p>This module contains definitions for the UIText and ActionText tables, for the
  682. standard installer actions.</p>
  683. </dd></dl>
  684. </section>
  685. </section>
  686. <div class="clearer"></div>
  687. </div>
  688. </div>
  689. </div>
  690. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  691. <div class="sphinxsidebarwrapper">
  692. <div>
  693. <h3><a href="../contents.html">Table of Contents</a></h3>
  694. <ul>
  695. <li><a class="reference internal" href="#"><code class="xref py py-mod docutils literal notranslate"><span class="pre">msilib</span></code> — Read and write Microsoft Installer files</a><ul>
  696. <li><a class="reference internal" href="#database-objects">Database Objects</a></li>
  697. <li><a class="reference internal" href="#view-objects">View Objects</a></li>
  698. <li><a class="reference internal" href="#summary-information-objects">Summary Information Objects</a></li>
  699. <li><a class="reference internal" href="#record-objects">Record Objects</a></li>
  700. <li><a class="reference internal" href="#errors">Errors</a></li>
  701. <li><a class="reference internal" href="#cab-objects">CAB Objects</a></li>
  702. <li><a class="reference internal" href="#directory-objects">Directory Objects</a></li>
  703. <li><a class="reference internal" href="#features">Features</a></li>
  704. <li><a class="reference internal" href="#gui-classes">GUI classes</a></li>
  705. <li><a class="reference internal" href="#precomputed-tables">Precomputed tables</a></li>
  706. </ul>
  707. </li>
  708. </ul>
  709. </div>
  710. <div>
  711. <h4>Previous topic</h4>
  712. <p class="topless"><a href="mailcap.html"
  713. title="previous chapter"><code class="xref py py-mod docutils literal notranslate"><span class="pre">mailcap</span></code> — Mailcap file handling</a></p>
  714. </div>
  715. <div>
  716. <h4>Next topic</h4>
  717. <p class="topless"><a href="nis.html"
  718. title="next chapter"><code class="xref py py-mod docutils literal notranslate"><span class="pre">nis</span></code> — Interface to Sun’s NIS (Yellow Pages)</a></p>
  719. </div>
  720. <div role="note" aria-label="source link">
  721. <h3>This Page</h3>
  722. <ul class="this-page-menu">
  723. <li><a href="../bugs.html">Report a Bug</a></li>
  724. <li>
  725. <a href="https://github.com/python/cpython/blob/main/Doc/library/msilib.rst"
  726. rel="nofollow">Show Source
  727. </a>
  728. </li>
  729. </ul>
  730. </div>
  731. </div>
  732. <div id="sidebarbutton" title="Collapse sidebar">
  733. <span>«</span>
  734. </div>
  735. </div>
  736. <div class="clearer"></div>
  737. </div>
  738. <div class="related" role="navigation" aria-label="related navigation">
  739. <h3>Navigation</h3>
  740. <ul>
  741. <li class="right" style="margin-right: 10px">
  742. <a href="../genindex.html" title="General Index"
  743. >index</a></li>
  744. <li class="right" >
  745. <a href="../py-modindex.html" title="Python Module Index"
  746. >modules</a> |</li>
  747. <li class="right" >
  748. <a href="nis.html" title="nis — Interface to Sun’s NIS (Yellow Pages)"
  749. >next</a> |</li>
  750. <li class="right" >
  751. <a href="mailcap.html" title="mailcap — Mailcap file handling"
  752. >previous</a> |</li>
  753. <li><img src="../_static/py.svg" alt="Python logo" style="vertical-align: middle; margin-top: -1px"/></li>
  754. <li><a href="https://www.python.org/">Python</a> &#187;</li>
  755. <li class="switchers">
  756. <div class="language_switcher_placeholder"></div>
  757. <div class="version_switcher_placeholder"></div>
  758. </li>
  759. <li>
  760. </li>
  761. <li id="cpython-language-and-version">
  762. <a href="../index.html">3.12.3 Documentation</a> &#187;
  763. </li>
  764. <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &#187;</li>
  765. <li class="nav-item nav-item-2"><a href="superseded.html" >Superseded Modules</a> &#187;</li>
  766. <li class="nav-item nav-item-this"><a href=""><code class="xref py py-mod docutils literal notranslate"><span class="pre">msilib</span></code> — Read and write Microsoft Installer files</a></li>
  767. <li class="right">
  768. <div class="inline-search" role="search">
  769. <form class="inline-search" action="../search.html" method="get">
  770. <input placeholder="Quick search" aria-label="Quick search" type="search" name="q" id="search-box" />
  771. <input type="submit" value="Go" />
  772. </form>
  773. </div>
  774. |
  775. </li>
  776. <li class="right">
  777. <label class="theme-selector-label">
  778. Theme
  779. <select class="theme-selector" oninput="activateTheme(this.value)">
  780. <option value="auto" selected>Auto</option>
  781. <option value="light">Light</option>
  782. <option value="dark">Dark</option>
  783. </select>
  784. </label> |</li>
  785. </ul>
  786. </div>
  787. <div class="footer">
  788. &copy;
  789. <a href="../copyright.html">
  790. Copyright
  791. </a>
  792. 2001-2024, Python Software Foundation.
  793. <br />
  794. This page is licensed under the Python Software Foundation License Version 2.
  795. <br />
  796. Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.
  797. <br />
  798. See <a href="/license.html">History and License</a> for more information.<br />
  799. <br />
  800. The Python Software Foundation is a non-profit corporation.
  801. <a href="https://www.python.org/psf/donations/">Please donate.</a>
  802. <br />
  803. <br />
  804. Last updated on Apr 09, 2024 (13:47 UTC).
  805. <a href="/bugs.html">Found a bug</a>?
  806. <br />
  807. Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.2.6.
  808. </div>
  809. </body>
  810. </html>
上海开阖软件有限公司 沪ICP备12045867号-1