windows 读取 Internet Explorer 保护模式注册表
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5255942/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Reading the Internet Explorer Protected Mode registry
提问by yoshi594
I'm learning the registry with vbscript on the side. I would like to know would I check the strValuname
and dwValue
of the internet explorer protected mode feature through the use of vbscript?
我正在学习带有 vbscript 的注册表。我想知道我会检查strValuname
和dwValue
Internet Explorer的保护模式功能通过使用VBScript的?
I tried searching the registry on the strKeyPath
to no avail. I was also not able to find the registry path for
我尝试在注册表中搜索strKeyPath
无济于事。我也无法找到注册表路径
"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\EnableMIC"
I was using windows7 when i couldn't find the above registry location.
当我找不到上述注册表位置时,我正在使用 windows7。
Thanks
谢谢
回答by Sven Ruchti
Here is a small vbs script which disables the protected mode for all four areas:
这是一个小的 vbs 脚本,它禁用所有四个区域的保护模式:
Const HKEY_CURRENT_USER = &H80000001
strComputer = "."
Set ScriptMe=GetObject("winmgmts:{impersonationLevel=impersonate}!\" & _
strComputer & "\root\default:StdRegProv")
'Disable protected mode for local intranet'
strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\"
strValueName = "2500"
dwValue = 1
ScriptMe.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue
'Disable protected mode for trusted pages'
strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\"
strValueName = "2500"
dwValue = 3
ScriptMe.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue
'Disable protected mode for internet'
strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\"
strValueName = "2500"
dwValue = 3
ScriptMe.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue
'Disable protected mode for restricted sites'
strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\"
strValueName = "2500"
dwValue = 3
ScriptMe.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue
Save it to a *.vbs and double click it to run it. From commandline use this command:
将其保存为 *.vbs 并双击它以运行它。从命令行使用此命令:
cscript.exe PATH_TO_THE_VBS_FILE
Finally if you want to do it manually in the registry with regedit, 0 to enable, 3 to disable, the DWORD with the name 2500 in following folders:
最后,如果您想使用 regedit 在注册表中手动执行此操作,0 启用,3 禁用,以下文件夹中名称为 2500 的 DWORD:
protected mode for local intranet
本地内网保护模式
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\
protected mode for trusted pages
受信任页面的保护模式
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\
protected mode for internet
互联网保护模式
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\
protected mode for restricted sites
受限站点的保护模式
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\
回答by Martijn Lentink
You can do this by reading the '2500' key at
您可以通过阅读“2500”键来做到这一点
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones
Where 3
means protected mode is disabled and 0
means enabled.
其中3
表示禁用保护模式,0
表示启用。
回答by EricLaw
What exactly are you looking for? Protected Mode is controlled by URLAction 0x2500 which you'll find under the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones keys.
你究竟在寻找什么?保护模式由 URLAction 0x2500 控制,您可以在 HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones 项下找到它。