summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorMartin v. L?wis <martin@v.loewis.de>2014-02-22 23:44:20 +0100
committerMartin v. L?wis <martin@v.loewis.de>2014-02-22 23:44:20 +0100
commit07ff73871a4ccf56150f72cd5c2f66104e5315e9 (patch)
treea7b66fc706f28db3d9416b052b6a7870e01a26ae /Tools
parentfde2c03a91c9294be6c2f3daf3c154b676672930 (diff)
downloadcpython-07ff73871a4ccf56150f72cd5c2f66104e5315e9.tar.gz
Issue #20641: Run custom actions with the NoImpersonate flag to support UAC.
Diffstat (limited to 'Tools')
-rw-r--r--Tools/msi/msi.py20
1 files changed, 9 insertions, 11 deletions
diff --git a/Tools/msi/msi.py b/Tools/msi/msi.py
index e816c8ac8a..8409b81d17 100644
--- a/Tools/msi/msi.py
+++ b/Tools/msi/msi.py
@@ -435,12 +435,13 @@ def add_ui(db):
("SetLauncherDirToWindows", 307, "LAUNCHERDIR", "[WindowsFolder]"),
# msidbCustomActionTypeExe + msidbCustomActionTypeSourceFile
# See "Custom Action Type 18"
- ("CompilePyc", 18, "python.exe", compileargs),
- ("CompilePyo", 18, "python.exe", "-O "+compileargs),
- ("CompileGrammar", 18, "python.exe", lib2to3args),
# msidbCustomActionTypeInScript (1024); run during actual installation
- ("UpdatePip", 18+1024, "python.exe", updatepipargs),
- ("RemovePip", 18, "python.exe", removepipargs),
+ # msidbCustomActionTypeNoImpersonate (2048); run action in system account, not user account
+ ("CompilePyc", 18+1024+2048, "python.exe", compileargs),
+ ("CompilePyo", 18+1024+2048, "python.exe", "-O "+compileargs),
+ ("CompileGrammar", 18+1024+2048, "python.exe", lib2to3args),
+ ("UpdatePip", 18+1024+2048, "python.exe", updatepipargs),
+ ("RemovePip", 18+1024+2048, "python.exe", removepipargs),
])
# UI Sequences, see "InstallUISequence Table", "Using a Sequence Table"
@@ -483,17 +484,14 @@ def add_ui(db):
# remove pip when state changes to INSTALLSTATE_ABSENT
# run before RemoveFiles
("RemovePip", "&pip_feature=2", 3499),
- ("CompilePyc", "COMPILEALL", 6800),
- ("CompilePyo", "COMPILEALL", 6801),
- ("CompileGrammar", "COMPILEALL", 6802),
+ ("CompilePyc", "COMPILEALL", 4002),
+ ("CompilePyo", "COMPILEALL", 4003),
+ ("CompileGrammar", "COMPILEALL", 4004),
])
add_data(db, "AdminExecuteSequence",
[("InitialTargetDir", 'TARGETDIR=""', 750),
("SetDLLDirToTarget", 'DLLDIR=""', 751),
("SetLauncherDirToTarget", 'LAUNCHERDIR=""', 752),
- ("CompilePyc", "COMPILEALL", 6800),
- ("CompilePyo", "COMPILEALL", 6801),
- ("CompileGrammar", "COMPILEALL", 6802),
])
#####################################################################