Request UAC elevation from within a Python script?

前端 未结 11 626

I want my Python script to copy files on Vista. When I run it from a normal cmd.exe window, no errors are generated, yet the files are NOT copied. If I run

11条回答
  •  有刺的猬
    2020-11-22 05:52

    Just adding this answer in case others are directed here by Google Search as I was. I used the elevate module in my Python script and the script executed with Administrator Privileges in Windows 10.

    https://pypi.org/project/elevate/

提交回复
热议问题