Solved

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

Posted on 2010-08-29
4
739 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

636 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