Posted by : Sudhir Chekuri Thursday, 26 September 2013

vbscript code to add trusted sites in ie.
Copy the below code in a text document ie., in notepad.
go through the code and replace the urls with your custom urls.
save it with .vbs extension.
double click on that vbs file to execute it and add site links into trusted sites in ie settings

vbscript code for adding trusted site in ie settings:
AddTrustedSite "http://ipds.gujarat.gov.in"
AddTrustedSite "http://pds.gujarat.gov.in"


Function AddTrustedSite(strDomainName)
    Set WshShell = Wscript.CreateObject("Wscript.Shell")
    strRegKey = "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\"
    WshShell.RegWrite strRegKey & strDomainName & "\", "", "REG_SZ"
    WshShell.RegWrite strRegKey & strDomainName & "\*", "2", "REG_DWORD"

End Function

Leave a Reply

Subscribe to Posts | Subscribe to Comments

Followers

Total Pageviews

Powered by Blogger.

Blog Archive

- Copyright © 2013 DevStudent - Metrominimalist - Powered by Blogger - Designed by Johanes Djogan -