0

I have made a python executable but it fails if not run with administrator. I have other files on my pc that has a UAC icon and when clicked always run as administrator.

Example

enter image description here

Does anyone know how I can change my python file to achieve this, thank you.

Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
  • let a batch script which elevates to start your program, effectively making it the way you like see [here](https://stackoverflow.com/a/7045097/12341099) – Yadu Jan 07 '21 at 04:17
  • Thats not what i am trying to achieve – Peter Johns Jan 07 '21 at 09:06
  • Your executable would have to have an [application manifest](https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests) with `requireAdministrator` set. With that said, though, why do you require administrator privilege? – Bill_Stewart Jan 12 '21 at 17:54

0 Answers0