Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sikulix/Jython UAC automation

Tags:

I was wondering if anyone had any luck automating through UAC pop-ups during installer automation?

I have an existing Automated installer code but it fails at the UAC area due to Sikuli not using keyboard/mouse during this step...

Anyone had any luck here? or no a way to do this in Jython?

Thanks

like image 296
user1304228 Avatar asked Mar 06 '17 21:03

user1304228


1 Answers

The reason Sikuli doesn't work in this scenarios is because the UAC dialog is displayed in a "Secure desktop" which you can read more about here. Secure desktop prevents all interaction so even you attempt to take a screenshot of the UAC dialog itself, it will fail.

That being said, there is a workaround. You can disable switching to secure desktop by following these steps:

  1. Run gpedit.msc
  2. Under Computer Configuration\Windows Settings\Security Settings\Local Policies\SecurityOptions, change "User Account Control: Switch to the secure desktop when prompting for elevation" to disabled.
like image 113
Eugene S Avatar answered Sep 21 '22 10:09

Eugene S