[python-win32] Check if user has windows administrator
Simon Dahlbacka
simon.dahlbacka at gmail.com
Tue Jan 15 08:29:04 CET 2008
>
>
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20080115/d3b253ef/attachment.htm
More information about the python-win32
mailing list