Skip to content

Instantly share code, notes, and snippets.

@G33kDude
Last active October 1, 2022 03:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save G33kDude/5619463 to your computer and use it in GitHub Desktop.
Save G33kDude/5619463 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