mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
Disable UAC by default.
This commit is contained in:
parent
945c632dff
commit
fd82f2e86a
1 changed files with 7 additions and 2 deletions
|
@ -289,7 +289,8 @@ def add_stream(db, name, path):
|
||||||
|
|
||||||
def init_database(name, schema,
|
def init_database(name, schema,
|
||||||
ProductName, ProductCode, ProductVersion,
|
ProductName, ProductCode, ProductVersion,
|
||||||
Manufacturer):
|
Manufacturer,
|
||||||
|
request_uac = False):
|
||||||
try:
|
try:
|
||||||
os.unlink(name)
|
os.unlink(name)
|
||||||
except OSError:
|
except OSError:
|
||||||
|
@ -311,7 +312,11 @@ def init_database(name, schema,
|
||||||
si.SetProperty(PID_AUTHOR, Manufacturer)
|
si.SetProperty(PID_AUTHOR, Manufacturer)
|
||||||
si.SetProperty(PID_TEMPLATE, msi_type)
|
si.SetProperty(PID_TEMPLATE, msi_type)
|
||||||
si.SetProperty(PID_REVNUMBER, gen_uuid())
|
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_PAGECOUNT, 200)
|
||||||
si.SetProperty(PID_APPNAME, "Python MSI Library")
|
si.SetProperty(PID_APPNAME, "Python MSI Library")
|
||||||
# XXX more properties
|
# XXX more properties
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue