Sikulix/Jython UAC自动化 [英] Sikulix/Jython UAC automation
问题描述
我想知道在安装程序自动化过程中是否有人通过UAC弹出窗口实现自动化?
I was wondering if anyone had any luck automating through UAC pop-ups during installer automation?
我有一个现有的自动安装程序代码,但由于Sikuli在此步骤中未使用键盘/鼠标,因此在UAC区域中失败...
I have an existing Automated installer code but it fails at the UAC area due to Sikuli not using keyboard/mouse during this step...
有人在这里有运气吗?还是无法在Jython中做到这一点?
Anyone had any luck here? or no a way to do this in Jython?
谢谢
推荐答案
Sikuli在这种情况下不起作用的原因是因为UAC对话框显示在安全桌面"中,您可以阅读有关
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:
- 运行
gpedit.msc
- 在
Computer Configuration\Windows Settings\Security Settings\Local Policies\SecurityOptions
下, 将"用户帐户控制:提示提升权限时切换到安全桌面"更改为禁用.
- Run
gpedit.msc
- 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.
这篇关于Sikulix/Jython UAC自动化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!