Windows Security Pop-Up

Apr 20, 2016 at 11:55 AM
I am installing some component which throws security pop with "Install" and "Don't Install" option. Now i am able to get hold off that windows however i am not able to click on install and don't install option. Kindly help me with this. I have tried following commands till now

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
Apr 21, 2016 at 6:40 PM
If the prompt is a security prompt on the other side of UAC, you need to be running PowerShell elevated ("As Administrator") in order to send keys or clicks to that prompt.
Apr 22, 2016 at 5:52 AM
Edited Apr 22, 2016 at 9:39 AM
Thanks. I figured that this also depends on the version of Windows we are using. I am trying on Windows 2012 which has different GUI than Windows 2008. So the above commands are working on Windows 2008 however on 2K12 they are not able to recognize the button on prompt.

Also UAC is turned off and I am running PowerShell as Administrator. Summary of windows controls are like this.
Window <<<<
Title: Windows Security
Class: #32770
Position: 701, 189
Size: 556, 250
Style: 0x96C80284
ExStyle: 0x00010109
Handle: 0x0000000000010248

Control <<<<
Class: DirectUIHWND
Instance: 1
ClassnameNN: DirectUIHWND1
Advanced (Class): [CLASS:DirectUIHWND; INSTANCE:1]
Position: 0, 0
Size: 540, 211
ControlClick Coords: 42, 12
Style: 0x56000000
ExStyle: 0x00000000
Handle: 0x000000000001024A

Mouse <<<<
Position: 751, 232
Cursor ID: 0
Color: 0xFFFFFF

Visible Text <<<<
Do&n't Install
You should only install driver software from publishers you trust. How can I decide which device software is safe to install?
Let me know if you have some suggestion on this.