Ok, so I'm still banging my head here not making much progress. I figured I would try out the Auto-it method since I found out there is a ruby wrapper. So the solution was pretty clean:
require './autoitwrapper.rb'
include AutoIt
ai = WIN32OLE.new("AutoItX3.Control")
ai.WinWaitActive("Windows Security")
ai.ControlClick("Windows Security", "", "OK")
The only problem with this solution is it just accepts whatever certificate is selected. Autoit cannot see the list inside this Windows Security dialog containing the list of certificates.
I looked into using just ruby and WIN32OLE, but even when I do that, I cannot find this dialog box. It only finds the actual Internet Explorer application.
Can anyone help out here?