How to give python admin priviledges or call python with admin priviledges?

Hao Sun 21 Reputation points
2021-03-28T22:49:10.537+00:00

What would be the equivalent of python3.8 setup.py install but having python run with admin privileges? p.s. can I give python admin privileges without having to reinstall to a different location?

Windows for business Windows Client for IT Pros Devices and deployment Configure application groups
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Jason Sandys 31,406 Reputation points Microsoft Employee Moderator
    2021-03-29T03:36:55.17+00:00

    Sorry, it's unclear what exactly you are asking about here. In Windows, you give users or groups (security principals) privileges and permissions (and not applications). So, what exactly are you trying to do or what exactly is not working that you would like to address?


  2. Hao Sun 21 Reputation points
    2021-03-29T03:59:50.737+00:00

    I reran using subprocess.call(['python.exe', 'setup.py', 'install']) following https://stackoverflow.com/questions/19672352/how-to-run-python-script-with-elevated-privilege-on-windows rather than python setup.py install and things worked


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.