通过注册表关闭兼容性视图

通过注册表关闭兼容性视图

我想关闭 IE 的兼容模式。我不想禁用它。

例如将以下键设置为9999。

REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION" /v "iexplore.exe" /t REG_DWORD /d 9999 /f
REG ADD "HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION" /v "iexplore.exe" /t REG_DWORD /d 9999 /f

这将覆盖设置。

我还发现通过 GPO:Admin Templates > Windows Components > Internet Explorer > Compatibility View > Turn off Compatibility View可以做同样的事情。

我只是希望它默认处于关闭状态,并且用户可以控制更改它。

将该选项设为灰色也不错:Display all websites in Compatibility View

答案1

我使用 procmon 来解决这个问题。

我希望在 HKLM 中找到解决方案......但不幸的是,这是用户偏好。

HKCU\Software\Microsoft\Internet Explorer\BrowserEmulation" /f /v AllSitesCompatibilityMode /t REG_DWORD /d "0"
HKCU\Software\Microsoft\Internet Explorer\BrowserEmulation" /f /v IntranetCompatibilityMode /t REG_DWORD /d "1"

因此我执行这个的方式是:

for /d %%X in (C:\Users\*) do (
reg.exe load HKLM\TempHive "%%X\NTUSER.DAT"
Reg Add "HKLM\TempHive\Software\Microsoft\Internet Explorer\BrowserEmulation" /f /v AllSitesCompatibilityMode /t REG_DWORD /d "0"
Reg Add "HKLM\TempHive\Software\Microsoft\Internet Explorer\BrowserEmulation" /f /v IntranetCompatibilityMode /t REG_DWORD /d "1"
reg.exe unload HKLM\TempHive )

我必须强制注销以确保用户 NTUSER.DAT 未加载。在我的测试中,我必须在登录屏幕上运行它。

对于部署的任何其他想法都将受到赞赏。

答案2

保罗,

我鼓励你尝试使用主动设置键

简而言之,您可以将自生成的 GUID 添加到以下任一位置:

HKLM\SOFTWARE\Wow6432Node\Microsoft\Active Setup\Installed Components, 或者 HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components

取决于您的架构。

在此 GUID 键中,添加以下值:

(Default) REG_SZ <A name for your task>
Version REG_SZ <A version number for your task>
StubPath REG_SZ <The command you want each user to run>

每个用户登录时都会运行一次 StubPath 值中的命令。在后续登录时,Windows 将根据 Version 键检查登录用户上次运行的版本号;如果 Version 键更高,则用户将重新运行 StubPath 字符串。

答案3

刚刚发现这一点并注意到你没有 HKLM 答案,因此我将提供对我有用的方法:

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Internet Explorer\BrowserEmulation]
"IntranetCompatibilityMode"=dword:00000001

答案4

仅供参考,根据我的经验,这无法通过 HKLM 工作。我不得不在一堆 Citrix 服务器上更改此设置。

由于我们想为所有用户(包括现有用户和新用户)禁用此功能,因此对我来说有效的方法是加载默认配置文件,而不是单个用户配置文件,然后编辑 HKCU 配置单元。我们还想在内部网站上禁用兼容模式。

感谢 Paul Mung 在此主题中提出问题和答案!

HKCU\Software\Microsoft\Internet Explorer\BrowserEmulation” /f /v AllSitesCompatibilityMode /t REG_DWORD /d“0”

HKCU\Software\Microsoft\Internet Explorer\BrowserEmulation" /f /v IntranetCompatibilityMode /t REG_DWORD /d "0"

相关内容