[Python-checkins] cpython (3.4): Issue #20641: Run custom actions with the NoImpersonate flag to support UAC.
larry.hastings
python-checkins at python.org
Mon Mar 17 07:32:52 CET 2014
http://hg.python.org/cpython/rev/31c7dc7ccbaa
changeset: 89764:31c7dc7ccbaa
branch: 3.4
user: Martin v. Löwis <martin at v.loewis.de>
date: Sat Feb 22 23:44:20 2014 +0100
summary:
Issue #20641: Run custom actions with the NoImpersonate flag to support UAC.
files:
Misc/NEWS | 3 +++
Tools/msi/msi.py | 20 +++++++++-----------
2 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -71,6 +71,9 @@
Build
-----
+- Issue #20641: Run MSI custom actions (pip installation, pyc compilation)
+ with the NoImpersonate flag, to support elevated execution (UAC).
+
- Issue #20221: Removed conflicting (or circular) hypot definition when
compiled with VS 2010 or above. Initial patch by Tabrez Mohammed.
diff --git a/Tools/msi/msi.py b/Tools/msi/msi.py
--- a/Tools/msi/msi.py
+++ b/Tools/msi/msi.py
@@ -435,12 +435,13 @@
("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 @@
# 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),
])
#####################################################################
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list