Installing Unsigned drivers

时间:2016-04-25 08:54:03

标签: python autoit pywinauto wasp

Windows Security dialog

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.

0 个答案:

没有答案