Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

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


  • Please log in to reply
8 replies to this topic

#1 Olsm

Olsm

    Seeker

  • Normal Members
  • 6 posts

Posted 14 October 2012 - 05:23 PM

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, 14 October 2012 - 05:29 PM.








#2 DaleHohm

DaleHohm

    Think of IE as an API...

  • MVPs
  • 5,985 posts

Posted 15 October 2012 - 03:51 PM

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

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


#3 Olsm

Olsm

    Seeker

  • Normal Members
  • 6 posts

Posted 17 October 2012 - 08:12 PM

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


#4 DaleHohm

DaleHohm

    Think of IE as an API...

  • MVPs
  • 5,985 posts

Posted 19 October 2012 - 06:40 PM

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

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


#5 chrshea

chrshea

    Seeker

  • Active Members
  • 38 posts

Posted 24 October 2012 - 08:30 PM

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" >

#6 Altiy

Altiy

    Seeker

  • Normal Members
  • 1 posts

Posted 02 September 2013 - 03:23 PM

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? 



#7 lionfaggot

lionfaggot

    Prodigy

  • Active Members
  • PipPipPip
  • 197 posts

Posted 25 November 2013 - 03:46 AM

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, 25 November 2013 - 04:18 AM.


#8 LionH

LionH

    Seeker

  • Active Members
  • 16 posts

Posted 15 November 2014 - 04:09 PM

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


  • Lion1985 likes this

#9 Golbez

Golbez

    Programer

  • Active Members
  • PipPipPipPipPipPip
  • 585 posts

Posted Yesterday, 05:25 AM

 

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_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", _ProcessGetName(@AutoItPID), "REG_DWORD", $regValue)
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\MicrosoftInternet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION", _ProcessGetName(@AutoItPID), "REG_DWORD", $regValue)





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users