Sign in to follow this  
Followers 0

_IECreateEmbedded embed old ie version (7 when 9 is installed) Please help thanks!

9 posts in this topic

Posted (edited)

Hi.

1: Why does _IECreateEmbedded() embed internet explorer version 7 when 9 is installed?

2: I know how to check ie version with _IEGet() and prompt to update if version is older than 9,

but how can I force _IECreateEmbedded() to use internet explorer 9 and how can I check correct version is embedded?

I use _IECreateEmbedded() function to embed internet explorer to my gui.

The website I want to browse requires internet explorer 9 and I get error message that browser is too old, because ie 7 is embedded even though ie 9 is installed/updated.

And even though internet explorer 9 is installed, _IECreateEmbedded() may embed an earlier version of internet explorer, in my case internet explorer 7.

At first it only happened on my computer at work, so I updated to ie9 and it still would embed ie7. My home computer embedded ie9.

My computer at work have started embedding the correct version after a while and I dont know what fixed it.

Then after I reinstalled my home computer with an installation disc that included service pack 1, internet explorer 9 was built in so I didnt have to update and autoit embeds ie7.

Can someone please help me solve this?

I have asked for help before, but nobody responded.

This project is very important to me, I would be very grateful if someone has a solution to this, or atleast will try to help.

Thanks in advance!

Below are two pictures to demonstrate whats wrong, they are both taken today on my home computer that has Windows 7 Ultimate 64-bit installed.

First whatismybrowser.com in internet explorer 9:

Posted Image

Then whatismybrowser.com in AutoIt using _IECreateEmbedded() :

Posted Image

Edited by Olsm

Share this post


Link to post
Share on other sites



Posted

You'll have more success asking in an MSDN community forum. _IECreateEmbedded simply returns ObjCreate("Shell.Explorer.2"). You will see the same behavior with VBScript CreateObject and you can ask your questions there from the perspective of VBScript to take AutoIt out of the picture.

Dale

Share this post


Link to post
Share on other sites

Posted

You'll have more success asking in an MSDN community forum. _IECreateEmbedded simply returns ObjCreate("Shell.Explorer.2"). You will see the same behavior with VBScript CreateObject and you can ask your questions there from the perspective of VBScript to take AutoIt out of the picture.

Dale

Hey.

Thanks allot for your reply!

I started searching two days ago after getting your reply.

I didnt know how to create a gui and embed ie in vbscript using createobject, so I searched around for tutorials.

I also searched for shell.explorer.2 to find more information about it.

Suddenly I came across this site while searching: http://go4answers.webhost4life.com/Example/shellexplorer-vs-internet-explorer-191462.aspx

And I thought stupid me, of course its called internet explorer render/rendering version, not internet embedding version etc that I had been searching.

I had been searching for days and I was trying to figure out how to solve this problem in many weeks. I was a little stuck in development of my browser, but I dont want to give up ever!

Then I searched for 'internet explorer render specify version' and I found this website explaining the solution: http://www.west-wind.com/weblog/posts/2011/May/21/Web-Browser-Control-Specifying-the-IE-Version

I cannot thank you enough DaleHohm for helping me figure this out, I am so happy that I finally got this problem solved, and I am very close to initial release of both my browser project and website.

I could create an UDF for setting the ie rendering version as a thank you back to you and this awesome community and scripting language that is AutoIt!

The name of the UDF could be _IE_VersionSet OR _IE_RenderingVersion OR just _IE_Version. What name should I chose?

I'll copy and poste the solution from the website I found below:

Feature Delegation via Registry Hacks

Fortunately starting with Internet Explore 8 and later there’s a fix for this problem via a registry setting. You can specify a registry key to specify which rendering mode and version of IE should be used by that application. These are not global mind you – they have to be enabled for each application individually.

There are two different sets of keys for 32 bit and 64 bit applications.

32 bit:

HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerMAINFeatureControlFEATURE_BROWSER_EMULATION

Value Key: yourapplication.exe

64 bit:

HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftInternet ExplorerMAINFeatureControlFEATURE_BROWSER_EMULATION

Value Key: yourapplication.exe

The value to set this key to is (taken from MSDN here) as decimal values:

9999 (0x270F)

Internet Explorer 9. Webpages are displayed in IE9 Standards mode, regardless of the !DOCTYPE directive.

9000 (0x2328)

Internet Explorer 9. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode.

8888 (0x22B8)

Webpages are displayed in IE8 Standards mode, regardless of the !DOCTYPE directive.

8000 (0x1F40)

Webpages containing standards-based !DOCTYPE directives are displayed in IE8 mode.

7000 (0x1B58)

Webpages containing standards-based !DOCTYPE directives are displayed in IE7 Standards mode.

The added key looks something like this in the Registry Editor:

Posted Image

Share this post


Link to post
Share on other sites

Posted

I'd suggest just creating a stand-alone UDF and post it here - then you get to choose the name :-)

Dale

Share this post


Link to post
Share on other sites

Posted

I had the same problem and this started me down the path to fixing it so thanks for the info. Here's a couple of other things that I found:

1. If you aren't sure what rendering engine it is using, navigate to: www.whatsmyuseragent.com (in the web browser control) and it will tell you.

2. If you control the HTML, then it may be simpler to use a META command in the HTML rather than change the registry. Insert the following command at the start of the <head> section:

<meta http-equiv="X-UA-Compatible" content="IE=9" >

Share this post


Link to post
Share on other sites

Posted

Hi all,

It is great solution with registry key.

 

Hey.
Thanks allot for your reply!

I started searching two days ago after getting your reply.
I didnt know how to create a gui and embed ie in vbscript using createobject, so I searched around for tutorials.
I also searched for shell.explorer.2 to find more information about it.
Suddenly I came across this site while searching: http://go4answers.webhost4life.com/Example/shellexplorer-vs-internet-explorer-191462.aspx

And I thought stupid me, of course its called internet explorer render/rendering version, not internet embedding version etc that I had been searching.
I had been searching for days and I was trying to figure out how to solve this problem in many weeks. I was a little stuck in development of my browser, but I dont want to give up ever!

Then I searched for 'internet explorer render specify version' and I found this website explaining the solution: http://www.west-wind.com/weblog/posts/2011/May/21/Web-Browser-Control-Specifying-the-IE-Version

I cannot thank you enough DaleHohm for helping me figure this out, I am so happy that I finally got this problem solved, and I am very close to initial release of both my browser project and website.
I could create an UDF for setting the ie rendering version as a thank you back to you and this awesome community and scripting language that is AutoIt!
The name of the UDF could be _IE_VersionSet OR _IE_RenderingVersion OR just _IE_Version. What name should I chose?

I'll copy and poste the solution from the website I found below:

Feature Delegation via Registry Hacks

Fortunately starting with Internet Explore 8 and later there’s a fix for this problem via a registry setting. You can specify a registry key to specify which rendering mode and version of IE should be used by that application. These are not global mind you – they have to be enabled for each application individually.
There are two different sets of keys for 32 bit and 64 bit applications.
32 bit:


HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerMAINFeatureControlFEATURE_BROWSER_EMULATION
Value Key: yourapplication.exe


64 bit:


HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftInternet ExplorerMAINFeatureControlFEATURE_BROWSER_EMULATION
Value Key: yourapplication.exe


The value to set this key to is (taken from MSDN here) as decimal values:
9999 (0x270F)
Internet Explorer 9. Webpages are displayed in IE9 Standards mode, regardless of the !DOCTYPE directive.

9000 (0x2328)
Internet Explorer 9. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode.

8888 (0x22B8)
Webpages are displayed in IE8 Standards mode, regardless of the !DOCTYPE directive.

8000 (0x1F40)
Webpages containing standards-based !DOCTYPE directives are displayed in IE8 mode.

7000 (0x1B58)
Webpages containing standards-based !DOCTYPE directives are displayed in IE7 Standards mode.


The added key looks something like this in the Registry Editor:
RegistryEditorEmulation_thumb.png

 

 

Works fine. Just a stupid question - is it possible to define these values in manifest? 

Share this post


Link to post
Share on other sites

Posted (edited)

my simple test sets the value in registry just fine however ie7 is still used, this is making me a bit mad now

#include <IE.au3>
#include <Process.au3>
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\MicrosoftInternet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION", _ProcessGetName(@AutoItPID), "REG_DWORD", "0x2328")
$mainwin = GUICreate("test", 700, 700)

$OBJECT = ObjCreate("Shell.Explorer.2")

$OBJECT_CTRL = GUICtrlCreateObj($OBJECT, 0, 0, 700, 600)
GUISetState()
_IENavigate($object, "http://www.whatsmyuseragent.com/")
While 1
    Sleep(100)
WEnd
Edited by lionfaggot

Share this post


Link to post
Share on other sites

Posted

When you use this solution, the following will stop working:

$oButton1 = _IEGetObjById($Obj, '_buttonId');
$oEvtButton1 = ObjEvent($oButton1, "clickedOnButton_");

Func clickedOnButton_onclick()
    MsgBox(0, "Yo", "Clicked on Button.")
EndFunc

Anyone know why that is?

onClick listener stops working on IE8+

Thanks,

 

Lion H

1 person likes this

Share this post


Link to post
Share on other sites

Posted

 

my simple test sets the value in registry just fine however ie7 is still used, this is making me a bit mad now

#include <IE.au3>
#include <Process.au3>
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\MicrosoftInternet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION", _ProcessGetName(@AutoItPID), "REG_DWORD", "0x2328")
$mainwin = GUICreate("test", 700, 700)

$OBJECT = ObjCreate("Shell.Explorer.2")

$OBJECT_CTRL = GUICtrlCreateObj($OBJECT, 0, 0, 700, 600)
GUISetState()
_IENavigate($object, "http://www.whatsmyuseragent.com/")
While 1
    Sleep(100)
WEnd

 

hey there i figured the problem out i think

 

Local $regValue = "0x2AF8"
 
RegWrite("HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMainFeatureControlFEATURE_BROWSER_EMULATION", _ProcessGetName(@AutoItPID), "REG_DWORD", $regValue)
RegWrite("HKEY_LOCAL_MACHINESOFTWAREMicrosoftInternet ExplorerMAINFeatureControlFEATURE_BROWSER_EMULATION", _ProcessGetName(@AutoItPID), "REG_DWORD", $regValue)

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

  • Recently Browsing   0 members

    No registered users viewing this page.