批处理添加允许弹出临时窗口站点

@echo off
Rem 请设置您要添加的信任站点IP或域名
Set TrustWeb=192.168.0.252
Reg Add 
"HKEY_Current_User\Software\Microsoft\Internet Explorer\New Windows\Allow" /v %TrustWeb% /t REG_BINARY  /f
pause
exit
底下是Vbs调用,隐藏执行窗口:

Dim Wshell,TrustUrl '创建变量
Set Wshell=createobject("wscript.shell"'建立wscript.shell对象
Rem
 这里设置你要添加的站点或IP(引号内)
TrustUrl="192.168.0.255"
TrustUrl
="Reg Add "&"""HKEY_Current_User\Software\Microsoft\Internet Explorer\New Windows\Allow"""&" /v "&TrustUrl&" /t REG_BINARY  /f "
Wshell.run 
"cmd /c "&TrustUrl,0
posted @ 2009-09-02 10:34  czperfectaction  阅读(830)  评论(0编辑  收藏  举报