Jump to content

IE9 automating Certificate Error


 Share

Recommended Posts

Hello,

I'm having a script running under XP which logs on to an SSL Website to add a user. Beacuse there is no valid certificate for this page I always get a certificate error.

In XP it was no problem to click on the link "continue anyway" via script. Now under Windows 7 this script doesn't work anymore. I'm getting the ErrorNumber 800706B5, Interface unknown and after that "Variable is not of type 'Object'. It looks like the created IE object is empty.

func userAnlegen($sVn, $sNN, $sTage, $sStat,$sPW)
$oIE= _IECreate("https://10.82.22.10/screens/aaa/guestuser_create.html",0,1,0)

if WinWait("Zertifikatfehler:","",15)<>0 Then
$sMyString = "Laden dieser Website fortsetzen (nicht empfohlen)."
$oLinks = _IELinkGetCollection($oIE)

For $oLink in $oLinks
$sLinkText = _IEPropertyGet($oLink, "innerText")
     If StringInStr($sLinkText, $sMyString) Then
       _IEAction($oLink, "click")
       ExitLoop
     EndIf
next
EndIf

After wondering why this script worked fine for me but didn't work on any other computer I found out, that it only works if this scripts runs with administrative rights. I allready tried to run the compiled exe with the Microsoft ApplicationCompatibility Toolkit which didnÄt work either. I really could need a little help here ;-)

Thanks

Plobb

Link to comment
Share on other sites

I think it's a security issue, and it's unlikely you will get help circumventing it here.

You have two options.

1. Run the script as admin (if that does really work)

2. Allow the user to decide whether or not to ignore this security warning manually (recommended)

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

I testet my script with different websites also with invalid certificates and they all work. I can access everything on this pages. It's only this one website (which comes from a Cisco WLAN Controller) which doesn't work without admin privileges. Even if i manually accept the certificate warning I can not access anything on the upcoming page. So as it seems that this isn't really an autoit problem which can be solved in this forum I'm going to get real drunk now -> I'm sure that at least this will work!

Link to comment
Share on other sites

I allready had _IEErrorHandlerRegister() employed. I've just been to stupid to tell google what I'm looking for :shifty:

But now I found what I've been looking for: I had moved this webpage to the trusted sites where protected mode was turned off. After removing the URL from trusted sites every thing is working again!

Thanks for your 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...