[python-win32] Check if user has windows administrator
Mark Hammond
mhammond at skippinet.com.au
Tue Jan 15 08:52:34 CET 2008
I should have been clearer - I need to come up with a way of integrating
that into distutils somehow. I could make a local patch, but that is error
prone and makes it hard for others to reproduce my builds. Having said that
though, it is possible I will do exactly that if it starts truly holding me
up.
Mark
Original message:
---------------------
From: Simon Dahlbacka [mailto:simon.dahlbacka at gmail.com]
Sent: Tuesday, 15 January 2008 6:29 PM
To: Mark Hammond
Cc: cappy2112 at gmail.com; python-win32 at python.org; graemeglass at gmail.com
Subject: Re: [python-win32] Check if user has windows administrator
Oh - and also how to either (a) force bdist_wininst executables to request
elevation or (b) have the .msi generation be smarter wrt upgrading so
installation is reasonable on Vista. Does anyone here have bdist_msi
experience?
For a), it should work by adding a manifest like this
<?xml version="1.0" encoding="utf-8" ?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0"
processorArchitecture="X86"
name="MyProjectName"
type="win32" />
<description>MyProjectDescription</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" />
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
"$(DevEnvDir)..\..\Common7\Tools\Bin\mt.exe" -manifest
"$(ProjectDir)$(TargetName).exe.manifest"
outputresource:"$(TargetDir)$(TargetFileName)";#1
More information about the python-win32
mailing list