Sign in to follow this  
Followers 0
gseller

Watch for and close axtivex popups

5 posts in this topic

Hey!

Thought I would share this one for anyone having trouble with a locked down Internet Explorer "Custom Security Settings"

At first I thought I would be able to go into the reg and change to a dword level of 47 and cdhange the keys in zones:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0

&

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0

but my reg is locked down where I need it on this pc at work so I figured I would make a cript to watch for and kill the popup then as a last resort. Here is what I have come up with. Many thanks g out to PsaltyDS for a great deal of help. I am including a zip with both the plain script that you can run behind the scenes or I have a version where you can enable/disable the function using code found in the google by evk86..

Here is the zipped files including Source/compiled/icons Enjoy! :)

Here is the plain code

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.2.10.0
 Author:         gseller - with help from PsaltyDS
 Created 02/04/2008
 Script Function: Watch for and close axtivex popup when pc is locked down and cannot allow activex to run in custom security settings in internet explorer.
 Instructions: Just have script running in backgroud. You can choose to have a systray icon or not.

#ce ----------------------------------------------------------------------------

#NoTrayIcon
Opt("WinTitleMatchMode", 4)
Global $sPopup = "[CLASS:#32770; TITLE:Internet Explorer; TEXT:ActiveX control]"
Global $sButton = "[CLASSNN:Button2; TEXT:Finish]"

AdlibEnable("_ActiveXOK", 150)

While 1
    Sleep(20)
WEnd

Func _ActiveXOK()
    If WinExists($sPopup) Then ControlClick($sPopup, "", $sButton)
EndFunc

Share this post


Link to post
Share on other sites



Is this tested on IE6 or IE7??

Also I cant figure out why you would want to turn off ActiveX. The single only reason I use IE is for ActiveX since it is so buggy on Opera, so why not use "Off By One" if it's limitations you are after??

Share this post


Link to post
Share on other sites

This is tested on IE7 so far but should work the same on IE6, all it does is looks for the window title and text. I will test on IE6 tonight at work. Also, like i said, the machine is locked down that this was created for so this is a last resort. I would rather just turn activex on myself, but not able...

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

This one works even better/faster:

edit: Tested and works great on I.E. 6 & 7!

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.2.10.0
 Author:         gseller - with help from PsaltyDS
 Created 02/04/2008
 Script Function: Watch for and close axtivex popup when pc is locked down and cannot allow activex to run in custom security settings in internet explorer.
 Instructions: Just have script running in backgroud. You can choose to have a systray icon or not.

#ce ----------------------------------------------------------------------------

;#NoTrayIcon
Opt("WinTitleMatchMode", 4)
AdlibEnable("_ActiveXOK", 150)

While 1
    Sleep(20)
WEnd

Func _ActiveXOK()
    WinKill("Internet Explorer", "A script is accessing some software (an ActiveX control) on this page which has been marked safe for scripting. Do you want to allow this?")
EndFunc

The original works good except when you enter into a search engine it pops up the same class and title and kills it too.. this way it just hits the specific popup...

Edited by gesller

Share this post


Link to post
Share on other sites

Also I cant figure out why you would want to turn off ActiveX.

Because it can be dangerous?

Share this post


Link to post
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
Sign in to follow this  
Followers 0