> I suppose that you use "runas" in order to get run in real
> administrator mode.

"runas" can actually refer to a couple of things.  One is in the manifest
that you refer to, but another alternative is for your executable to use
ShellExecute, with a verb of "runas" to re-execute itself.


> #2 : the .exe must have a manifest that contains :
> """
> ... (I use the "python.exe.manifest" in which I add the following)
> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
>   <security>
>    <requestedPrivileges>
>     <requestedExecutionLevel
>      level="requireAdministrator"
>      uiAccess="false"/>
>    </requestedPrivileges>
>   </security>
> </trustInfo>
> """
> 
> 
> I've put the manifest directly in the .exe using py2exe and :
> 'other_resources': [(24, 1, mymanifest)],
> "24" is where the manifest should be.

I'm not sure this will work (and I'm not sure if you are saying it does or
doesn't work).  To check it works, you should use the 'mt.exe' tool that
comes with the MSVC compilers and Platform SDKs to check it can extract a
manifest, and it is as you expect.

Yet another alternative is to use mt.exe *after* py2exe has run to embed the
manifest in the final executable.

Note however that it is rare you need the py2exe created executable to run
as administrator - it is the *installer* for the py2exe program that
generally needs this.

> #3 Maybe someone could complete here ...?

Hope the above help.

Cheers,

Mark

_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to