4

我正在学习带有 vbscript 的注册表。我想知道我会通过使用 vbscript 检查 Internet Explorer 保护模式功能的和吗strValunamedwValue

我尝试在注册表上搜索strKeyPath无济于事。我也找不到注册表路径

"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\EnableMIC"

当我找不到上述注册表位置时,我正在使用 windows7。

谢谢

4

3 回答 3

14

这是一个小的 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\
于 2013-01-08T13:34:25.047 回答
6

你可以通过阅读'2500'键来做到这一点

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3

其中3表示保护模式已禁用,0表示已启用。

于 2012-03-01T17:53:46.663 回答
2

你到底在找什么?保护模式由 URLAction 0x2500 控制,您可以在 HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones 键下找到它。

于 2011-03-10T12:10:59.057 回答