Solved

I need a vbscript to add a site to the trusted zone of internet explorer

Posted on 2010-08-29
4
717 Views
Last Modified: 2012-05-10
It has to be added to the hklm so it works for every user.
0
Comment
Question by:itbabe
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
Bogeholm earned 125 total points
Comment Utility
Read an answar to a similar Q here:
http://blogs.technet.com/b/heyscriptingguy/archive/2005/02/14/how-can-i-add-a-web-site-to-the-trusted-sites-zone.aspx

You need to test if you can get it to work by changing script to point to HKLM

HKLM - Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\yourdomain.com

Create a DWORD 'http'.
0
 
LVL 39

Assisted Solution

by:Krzysztof Pytko
Krzysztof Pytko earned 125 total points
Comment Utility
prepare a reg file (you can export it from existing environment) and use from command-line

reg import <your_reg_file>

I think it's the most simply solution.
0
 
LVL 17

Assisted Solution

by:Tony Massa
Tony Massa earned 250 total points
Comment Utility
This script would add "download.microsoft.com" to the list of trusted sites.  You can replace with "*" to add all microsoft.com sites to trusted sites zone.
Const HKEY_CURRENT_USER = &H80000001



strComputer = "."

Set objReg=GetObject("winmgmts:\\" & strComputer &

"\root\default:StdRegProv")

strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Internet

Settings\" _

    & "ZoneMap\Domains\microsoft.com"



objReg.CreateKey HKEY_CURRENT_USER, strKeyPath



strValueName = "download"

dwValue = 2



objReg.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, strValueName, dwValue

Open in new window

0
 
LVL 17

Assisted Solution

by:Tony Massa
Tony Massa earned 250 total points
Comment Utility
Disregard the previous code snippet...EE and my paste function don't agree:
TrustedSites.txt
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

We have adopted the strategy to use Computers in Student Labs as the bulletin boards. The same target can be achieved by using a Login Notice feature in Group policy but it’s not as attractive as graphical wallpapers with message which grabs the att…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now