[Python-checkins] r64278 - python/trunk/Tools/msi/msilib.py

martin.v.loewis python-checkins at python.org
Sat Jun 14 16:24:47 CEST 2008


Author: martin.v.loewis
Date: Sat Jun 14 16:24:47 2008
New Revision: 64278

Log:
Disable UAC by default.


Modified:
   python/trunk/Tools/msi/msilib.py

Modified: python/trunk/Tools/msi/msilib.py
==============================================================================
--- python/trunk/Tools/msi/msilib.py	(original)
+++ python/trunk/Tools/msi/msilib.py	Sat Jun 14 16:24:47 2008
@@ -289,7 +289,8 @@
 
 def init_database(name, schema,
                   ProductName, ProductCode, ProductVersion,
-                  Manufacturer):
+                  Manufacturer,
+                  request_uac = False):
     try:
         os.unlink(name)
     except OSError:
@@ -311,7 +312,11 @@
     si.SetProperty(PID_AUTHOR, Manufacturer)
     si.SetProperty(PID_TEMPLATE, msi_type)
     si.SetProperty(PID_REVNUMBER, gen_uuid())
-    si.SetProperty(PID_WORDCOUNT, 2) # long file names, compressed, original media
+    if request_uac:
+        wc = 2 # long file names, compressed, original media
+    else:
+        wc = 2 | 8 # +never invoke UAC
+    si.SetProperty(PID_WORDCOUNT, wc)
     si.SetProperty(PID_PAGECOUNT, 200)
     si.SetProperty(PID_APPNAME, "Python MSI Library")
     # XXX more properties


More information about the Python-checkins mailing list