Solved

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

Posted on 2010-08-29
4
718 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
ID: 33552598
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
ID: 33552925
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
ID: 33558207
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
ID: 33558245
Disregard the previous code snippet...EE and my paste function don't agree:
TrustedSites.txt
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Step by step guide to Clean and Sort your windows registry! Introduction: Always remember: A Clean registry = Better performance = Save your invaluable time In this article we're going to clear our registry manually! Yes, manually! The e…
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 …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

920 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