1

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.

Andreas
  • 5,393
  • 9
  • 44
  • 53
RazerX
  • 11
  • 1
  • Did you try to disable User Account Control (UAC) to zero level? – Vasily Ryabov Apr 25 '16 at 10:12
  • Yes turned it to zero. try bcdedit as well. – RazerX Apr 25 '16 at 10:46
  • Hmm... Maybe `Disable driver signature enforcement` would help. Examples: [for Win8.1/10](http://www.howtogeek.com/167723/how-to-disable-driver-signature-verification-on-64-bit-windows-8.1-so-that-you-can-install-unsigned-drivers/) and [for WinServer 2012](https://blogs.msdn.microsoft.com/emberger/2014/04/21/windows-server-2012-r2-install-unsigned-drivers/). – Vasily Ryabov Apr 25 '16 at 10:52
  • Thanks. I will check that. I read the steps provided in link. According to it, there is enhanced security in 2012 so disabling driver signature enforcement will reduce the security but you will still see a pop-up. – RazerX Apr 25 '16 at 11:18
  • Tried Driver signature enforcement with no success. Any other suggestions? – RazerX Apr 29 '16 at 04:58
  • No ideas more. If you solve it, please answer your own question. It's interesting to know for others. – Vasily Ryabov May 01 '16 at 16:58

0 Answers0