I want to programatically set some registry keys. As part of an install routine, I want to enable all Active X options - in the trusted zone.
These options are at HK_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2
(2 is the trusted zone) and then have numerical key names for the options.
All that I could find was this page, but when I follow it then look in Inetrnet Explorer (v 9)'s options I see that most of the radio groups have no Active X options selected.
For instance, according to that link
ActiveX controls and plug-ins
Allow ActiveX Filtering REG:HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3\2702
When my installer set this key to 1 (in zone 2, not 3) the update was made correctly (verified with Regedit), but in IE 9, the "Allow ActiveX Filtering" radio group for the trusted zone had neither button checked.
So, I tried monitoring registry access, using RegScanner, but when I only clicked to enable "Allow ActiveX Filtering" for the trusted zone, there were dozens of writes to HK_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2
and sicne they have numerical key names, I cannot know which is which.
Can anyone help? Thanks in advance.
Also, do you if these options are independant of MSIE version (I think that they ought to be)?
Wait, maybe not, as this page for IE 6 shows different keys. Can anyone say for sure?
Can you think of any way to automate this? I can't just arecord a macro, but maybe I can use AutoIt, run MS IE, check the version number and then write some code to simulate a user opening the dialog & cehcking radio buttons as approriate?
Rather than editing the registry (which can involve quite a few writes), I would write an autoit script which runs IE, opens the options menu, clicks the appropriate checkbox, then presses okay.
This will get you started:
#include <IE.au3>
$oIE = _IECreate()
ControlSend("Blank Page - Windows Internet Explorer", "", "", "!to")