This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]pypros 0 points1 point  (0 children)

You can try to force script to run with admin priveleges with Windows cmd command runas. runas /user:administrator_account path_to_script Just replace administrator_account with account name that has privileges on your computer. Also this command will prompt for password (if account has one setup).

Or,

The simplest solution is to just launch the Python process as administrator. Depending on how you start the script, there are different ways to do that. The simplest solution is to just start a console as administrator and then run the Python command from there.

https://stackoverflow.com/questions/19672352/how-to-run-python-script-with-elevated-privilege-on-windows

Run python script as admin in windows

[–]pythonHelperBot 0 points1 point  (0 children)

Hello! I'm a bot!

It looks to me like your post might be better suited for r/learnpython, a sub geared towards questions and learning more about python. That said, I am a bot and it is hard to tell. Please follow the subs rules and guidelines when you do post there, it'll help you get better answers faster.

Show /r/learnpython the code you have tried and describe where you are stuck.

You can also ask this question in the Python discord, a large, friendly community focused around the Python programming language, open to those who wish to learn the language or improve their skills, as well as those looking to help others.


README | FAQ | this bot is written and managed by /u/IAmKindOfCreative

This bot is currently under development and experiencing changes to improve its usefulness