我正在一边学习注册表,一边使用 vbscript。我想知道是否可以通过使用 vbscript 检查 Internet Explorer 保护模式功能的 strValuname
和 dwValue
?
我尝试在 strKeyPath
上搜索注册表但无济于事。我也找不到
"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\EnableMIC"
当我找不到上述注册表位置时,我正在使用 windows7。
谢谢
最佳答案
这是一个小的 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\1\"
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\2\"
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\3\"
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\4\"
strValueName = "2500"
dwValue = 3
ScriptMe.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue
保存为*.vbs文件,双击运行。从命令行使用此命令:
cscript.exe PATH_TO_THE_VBS_FILE
最后,如果您想在注册表中使用 regedit 手动执行此操作,0 启用,3 禁用,以下文件夹中名为 2500 的 DWORD:
本地 Intranet 的保护模式
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1\
受信任页面的保护模式
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\
互联网保护模式
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3\
受限站点的保护模式
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\
关于windows - 读取 Internet Explorer 保护模式注册表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5255942/