Closed victorccaldas closed 2 years ago
@victorccaldas that is likely due to User Interface Privilege Isolation (UIPI)
UIPI blocks Windows messages being sent from process with a lower MIC level to one running at a higher MIC level.
Since the keyboard and mouse functions are implemented via messages they are blocked.
More info here: https://en.wikipedia.org/wiki/User_Interface_Privilege_Isolation and here https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/user-account-control-allow-uiaccess-applications-to-prompt-for-elevation-without-using-the-secure-desktop
Thank you for this explanation hhslepicka. Yes, this is a feature that Windows antivirus programs use, because they didn't want viruses being able to disable antivirus. I believe the solution is to run your script with as admin.
Never came to this before, but PAG actually can't interact with core Windows programs, such as Registry Editor. I was trying to automate the exporting of some registries as .txt, to later read them with Python, and found that PAG keyboard presses simply don't interact with the RegEditor. Tried pressing Alt, F2, F6, Ctrl + C... nothing works.
At least the good old jitbit Macro Recorder could do the job, but Pyautogui should be the first option.
Obs. I'm using Windows 10