Installing Unsigned drivers

99封情书 提交于 2019-12-11 11:54:26

问题


I am trying to automate some stuff where I am installing certain drivers. However as the drivers are unsigned I am seeing attached security dialogue. I want to automate and click "Install" or "Don't Install" on the security dialog. Till now I have tried certain options like pywinauto, WASP and AutoIt but nothing seemed to work.

Below are the options I have tried so far:

WASP

Select-Window -title "Windows Security"| Set-WindowActive | Send-Keys "%n" 

Select-Window -title "Windows Security | Set-WindowActive | Select-Control -title "Do&n't I&nstall" | Send-Keys "%n" 

Select-Window -title "Windows Security | Set_WindowActive | Select-Control -title "Do&n't I&nstall" -recurse | Send-Click

AutoIt

1.

WinActivate("Windows Security" , "")     
ControlClick("Windows Security" , "" , "[CLASS:Button;INSTANCE:2]")

2.

WinWait("Windows Security", "")    
WinActivate("Windows Security")    
ControlSend("Windows Security" , "" , "[Class:Button;Instance:2]" , ("{Enter}"))
Exit(0)

These commands are working fine on Windows 2008 however fails on Windows 2012. Please help me on how to resolve this issue.

Note: In Windows 2012, only the window is getting activated. However after that nothing happens.

来源:https://stackoverflow.com/questions/36835890/installing-unsigned-drivers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!