Skip to content

Instantly share code, notes, and snippets.

@tmplinshi
Forked from G33kDude/FixIE.ahk
Created January 17, 2016 23:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmplinshi/e5d3cde99afe7a52ec8c to your computer and use it in GitHub Desktop.
Save tmplinshi/e5d3cde99afe7a52ec8c to your computer and use it in GitHub Desktop.
Force embedded IE (shell.explorer) to use a better render engine
FixIE(Version=0, ExeName="")
{
static Key := "Software\Microsoft\Internet Explorer"
. "\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION"
, Versions := {7:7000, 8:8888, 9:9999, 10:10001, 11:11001}
if Versions.HasKey(Version)
Version := Versions[Version]
if !ExeName
{
if A_IsCompiled
ExeName := A_ScriptName
else
SplitPath, A_AhkPath, ExeName
}
RegRead, PreviousValue, HKCU, %Key%, %ExeName%
if (Version = "")
RegDelete, HKCU, %Key%, %ExeName%
else
RegWrite, REG_DWORD, HKCU, %Key%, %ExeName%, %Version%
return PreviousValue
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment