1

Good afternoon,

New to coding and Python and trying to make my first program.

Every time I try and freeze my code using pyinstaller, it functions correctly but the .exe created always requires admin access to run (which I don't want).

The code I am using to run pyinstaller is pyinstaller -F -w StationUpdater.py.

I have read that you can enable UAC using --uac-admin although this is opposite as to what i'm looking to do.

From reading related threads there is a manifest file being embedded into the .exe that has elevated permissions? How can I prevent this?

Every time I run pyinstaller it generates a manifest file in the \build folder which has the values:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <assemblyIdentity type="win32" name="Stationupdater" processorArchitecture="x86" version="1.0.0.0"/>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" language="*" processorArchitecture="*" version="6.0.0.0" publicKeyToken="something"/>
      <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"/>
    </dependentAssembly>
  </dependency>
  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
    <application>
      <supportedOS Id="{-}"/>
      <supportedOS Id="{-}"/>
      <supportedOS Id="{-}"/>
      <supportedOS Id="{-}"/>
      <supportedOS Id="{-}"/>
    </application>
  </compatibility>
</assembly>

Is there something I'm missing?

I noticed there isn't anything about

<requestedExecutionLevel  level="asInvoker" uiAccess="false" />

that I have been reading about might be needed?

Thank you in advance.

CDerk
  • 11
  • 2
  • Does [this answer](https://stackoverflow.com/a/10541026/1219295) help? – Roland Smith Apr 20 '20 at 22:07
  • I saw that thread I, I tried to edit the manifest file that pyinstaller generated but it would just overwrite the file. Or maybe I am not editing it properly?.... – CDerk Apr 20 '20 at 22:53
  • Are you using the `--manifest` option as suggested in the link? – Roland Smith Apr 20 '20 at 23:09
  • Yeah I tired to adjust the manifest I posted above and it didn't change. There is not much I can find on the internet about adjusting manifest files, mainly just creating them. Any recommendations? – CDerk Apr 21 '20 at 00:38

0 Answers0