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 5: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 4:52 AM
Edited Apr 22, 2016 at 8: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.
Title: Windows Security
Position: 701, 189
Size: 556, 250
Advanced (Class): [CLASS:DirectUIHWND; INSTANCE:1]
Position: 0, 0
Size: 540, 211
ControlClick Coords: 42, 12
Position: 751, 232
Cursor ID: 0
Visible Text <<<<
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.