Good evening! A question for Python gurus. There is a program that is converted to exe using pyinstaller. Everything would be fine, but I need to, when I run the resulting executable file on Win with UAC, a request for elevation of rights occurs. This effect cannot be achieved using the –uac-admin parameter. Python 3.4.4, pyinstaller 3.2 Tell me, pliz, how to implement a request for admin rights for my case?
2 answers
When using the --uac-admin parameter in pyinstaller, a manifest should be created (in my opinion, it is located in the build folder), which needs to be added to the exe file with the --manifest parameter.
|
1 . Try temporarily disabling UAC. Control Panel -> Change User Account Control Settings (UAC) -> "Never Notify" OR Shut Down
C: \ Windows \ System32 \ cmd.exe / k; C: \ Windows \ System32 \ reg.exe ADD HKLM \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Policies \ System / v
Turning on
C:\Windows\System32\cmd.exe /k C:\Windows\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA/t REG_DWORD /d 1 /f 2 Run as admin
3 Add to exceptions - http://tigors.net/disable-uac-for-some-applications/
|