Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2010-08-29
4
Medium Priority
?
767 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 500 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 500 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 1000 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 1000 total points
ID: 33558245
Disregard the previous code snippet...EE and my paste function don't agree:
TrustedSites.txt
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
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…
Suggested Courses

972 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