vb设置IE安全性(IP设为受信站点)

'在程序中调用次方法即可

 

 

Private Sub addAuth(pip As String)
    Set WshShell = CreateObject("WScript.Shell")
      
    Call WshShell.RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range100\", "")
    Call WshShell.RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range100\http", "2", "REG_DWORD")
    Call WshShell.RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range100\:Range", pip)

    '修改IE ActiveX安全设置

    Call WshShell.RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3\1001", "0", "REG_DWORD")
    Call WshShell.RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3\1004", "0", "REG_DWORD")
    Call WshShell.RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3\1200", "0", "REG_DWORD")
    Call WshShell.RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3\1201", "0", "REG_DWORD")
    Call WshShell.RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3\1405", "0", "REG_DWORD")
    Call WshShell.RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3\2201", "0", "REG_DWORD")
    '禁用xinxp弹出窗口阻止程序

    Call WshShell.RegWrite("HKCU\Software\Microsoft\Internet Explorer\New Windows\PopupMgr", "no")

    'MsgBox ("active控件安全设置,弹出窗口设置,信任站点设置成功")

End Sub

你可能感兴趣的:(windows,IE,Microsoft,vb)