Jump to content

_IECreateEmbedded() does not show "Choose a digital certificate" dialog


pluto41
 Share

Recommended Posts

$o_IE = _IECreate ()
_IENavigate ($o_IE, "http://www.whatver.com")
_IEQuit($o_IE

The sample code above opens a website. If the website requires logon with a smart-card or certificate automatically the Windows: "Choose a digital certificate" dialog opens. There seems to be communication between Internet Explorer and the under laying OS.

However. In my AutoIT script i try to use the _IECreateEmbedded() function. And then the dialog isn't displayed! My code stays in the menu loop. I keep outputting debug HTML code to the console with:

Local $htmlBodyText = _IEBodyReadText ($o_IE)
_IELoadWait ($o_IE)
ConsoleWrite ("==> " & $htmlBodyText & @CRLF)

But i don't see anything going wrong. Its just the "Digital Certificate Popup" that doesn't appears. I can refresh() with F5 in the IE window and then i get a IE message that the certificate isn't valid. Which is correct because i don't get a change to choose. one.

Local $o_IE = _IECreateEmbedded ()
Local $hGUI = GUICreate ("WinTitle",$mainUiWidth, $mainUiHeight, -1, -1, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN)
Local $GUIActiveX = GUICtrlCreateObj($oIE, 10, 10, $mainUiWidth-10, $mainUiHeight-100)
_IENavigate ($o_IE, "http://www.whatver.com")
_IELoadWait ($o_IE)

_IECreate() <- no problems.

_IECreateEmbedded <- no certificate popup.

I had a look at IE.au3 and noticed that completely different Windows functions are used. So perhaps what i want to do isn't possible at all....

But perhaps someone can point me in the right direction. Or a way to script around this problem.. Thanks in advance.

Link to comment
Share on other sites

In my sig you'll see a pointer to a possible alternative to _IECreateEmbedded... check it out. It uses a normal browser instances.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

  • 3 months later...

I have the same problem.. is there a way i can iterate through the list of certificates that comes up in the windows security dialog till I find the one whose friendly name matches the one i want to select? Is there anyway to just interate through the contents of things listed in the windows security box?I would really appreciate any help

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...