]> granicus.if.org Git - python/commitdiff
Disable UAC by default.
authorMartin v. Löwis <martin@v.loewis.de>
Sat, 14 Jun 2008 14:24:47 +0000 (14:24 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sat, 14 Jun 2008 14:24:47 +0000 (14:24 +0000)
Tools/msi/msilib.py

index d2f8764ee33866d98a832644dd00e7fe119d53ee..6f49b4cf8c354cad983bd47c9a33c5d7546646b2 100644 (file)
@@ -289,7 +289,8 @@ def add_stream(db, name, path):
 
 def init_database(name, schema,
                   ProductName, ProductCode, ProductVersion,
-                  Manufacturer):
+                  Manufacturer,
+                  request_uac = False):
     try:
         os.unlink(name)
     except OSError:
@@ -311,7 +312,11 @@ def init_database(name, schema,
     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