1

This should be a simple question that should have a simple solution...yet nothing that I have tried works. My question is why? Is there a security feature in Microsoft preventing sending keys to "Security Windows"?

enter image description here

AutoiT attempt (does not work):

WindWait("Windows Security")
Send("{DOWN}")
Sleep(10)
Send("{ENTER}")

I have also tried/look at this question

I have tried to do this in C++ and in C# and I can only get the window to become the active window but when I send keys to it it ignores it.

Below are some of the places that I have look in order to suppress or automate this window:

Windows 7 - Disable signature verification of drivers

Permanently disable driver signature enforcement on Win 7 x64

How to disable driver signing in Windows 7 SP1

Disabling digital driver signing in Windows 7

Windows - Suppress "Windows can't verify the publisher of this driver software"

All "solutions" from the above links don't work. I have been searching for an answer for more than 2 days now.

If someone can tell a successfully way to suppress/automate this I (and everyone that wants to know how to do this too) will really appreciated.

Community
  • 1
  • 1
0gravity
  • 2,682
  • 4
  • 24
  • 33

2 Answers2

1

Are you able to identify the window using the Win... functions? If so you could try using MouseClick:

$aPos = WinGetPos("Windows Security")
MouseClick("left", $aPos[0]+50, $aPos[1]+100)

First get the position of the window, then add some pixels so that when you do a right-click with the mouse you click the appropriate button. Of course you need to adjust the number of pixels to add to the x-/y-axis.

Andreas
  • 5,393
  • 9
  • 44
  • 53
  • +1: I think this might work but if the screen resolution is different then the amount in x and the amount in y will change right? – 0gravity Jul 31 '13 at 12:08
  • You could probably use `WinMove(...)` to set it to a defined position and size. – Samoth Jul 31 '13 at 12:32
  • 1
    @0gravity: From my point of view a button which was defined as 20px wide and 9px tall will still have this dimension after the screen resolution gets changed. – Andreas Jul 31 '13 at 13:04
  • And you'd better use `"primary"` than `"left"` for the `MouseClick(...)`. – Samoth Jul 31 '13 at 13:25
  • @mrt: It's possible for modal dialogs to change the button positions according to its size. In this special case of the non-modal windows security dialog it's important to consider that depending on the possible identification methods your dialog size will vary. E.g. when you have a Smartcard reader installed or when you use a network domain authentification... – Samoth Jul 31 '13 at 13:29
  • @mrt After trying what you suggested, it does not work...I tried just mouse move but the mouse does not moves to the location that I want. I noticed that if I take the WinWait("Windows Security") then the mouse moves. So if I run the script before the window comes up the muse does not moves, but if the window is already up the mouse moves. ??? – 0gravity Jul 31 '13 at 14:42
  • @0gravity: Is the example from the help file for `MouseMove` working for you? I would be very surprised if not. It's basically a good idea to use `WinWait()` just to be sure that the window is there before you start clicking around! ;) – Andreas Aug 01 '13 at 06:19
  • @mrt MouseMove works if you don't do WinWait() before it. I know is weird but you can try it yourself...this won't happen with other windows like notepad, Firefox, ect. – 0gravity Aug 01 '13 at 11:55
1

I know this is old, but I just came across this issue as well.
I was able to solve it by using the following once the window was active:

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

It did not work if I included the TEXT:&Install this driver software anyway in the control ID.

Marcus
  • 5,407
  • 3
  • 31
  • 54