how would I make a python script request administraitor permition

Douglas Wiltz 1 Reputation point

if I had a system that needs to alter something that requires admin access, how, using python, would i request access to these files?

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,927 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 44,036 Reputation points

    Hi. Thank you for your question and reaching out. My name is John and I’d be more than happy to help you with your query.

    For Python.exe, create a shortcut.
    Modify the shortcut target to read C:xxx...python.exe your instead.
    In the shortcut's property panel, select "advance..." and then "run as administrator."

    For reference, please see

    If the reply was helpful, please don’t forget to upvote or accept as answer, thank you.
    Best regards,

    0 comments No comments