With the ever growing popularity of web server based products from Microsoft and other vendors I have seen more and more clients require sites to be added to their "Trusted Sites" list. For domains it's as easy as making a few Group Policy changes and viola! For individual non domain joined machines it's a bit more involved. Internet Explorers "Enhanced Security Configuration" or ESC is not on by default for Windows 7 clients, which I recommend turning on due to the rampant virus and spyware that plagues users of the open Internet.
I've explained many times to users how to manually add the sites they require to their trusted sites. This is very difficult as it's time consuming to do and some users don't have the level of knowledge required to make the changes. I came up with a script that will allow the sites to be added easily by just filling in the sites and deploying the script and having the user execute(requires local admin access).
Remember to be careful and only add sites you truly know are safe as this can have unintended consequences for users who require the use of websites that employ ActiveX, javascript. The registry key for adding sites is located here -
- Per User -
- HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\EscDomains
- The Whole Machine (Globally)
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\EscDomains
If you are working on specific users needs than you will want to edit the HKCU(HKEY_CURRENT_USER), but if you need the same sites or domains trusted then use the HKLM(HKEY_LOCAL_MACHINE). Below I will give two different approaches to making this an easy add for your users or for you as the admin.
The first way is using the following Visual Basic script:
Option Explicit
Dim DomainArray(5), strComputer, strHTTP, strHTTPS
Dim dwordZone, regPath, objReg, counter, subkeyPath
Dim subkeyValue
Const HKEY_LOCAL_MACHINE = &H80000002
DomainArray(0) = "trusteddomain0.com"
DomainArray(1) = "trusteddomain1.com"
DomainArray(2) = "trusteddomain2.com"
DomainArray(3) = "trusteddomain3.com"
DomainArray(4) = "trusteddomain4.com"
strComputer = "."
strHTTP = "http"
strHTTPS = "https"
dwordZone = "2"
regPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings" &_
"\ZoneMap\EscDomains\"
Set objReg = GetObject("winmgmts:{impersonationLevel = impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
For counter = 0 to 4
subkeyPath = regPath & DomainArray(counter)
objReg.CreateKey HKEY_LOCAL_MACHINE,subkeyPath
objReg.SetDWORDValue HKEY_LOCAL_MACHINE,subkeyPath,strHTTP,dwordZone
objReg.SetDWORDValue HKEY_LOCAL_MACHINE,subkeyPath,strHTTPS,dwordZone
Next
The above script when executed will insert 'trusted domain0.com', 'trusteddomain1.com' and etc to Internet Explorers trusted sites zone when run on any machine. To run this script the user running it will need to be a local admin on the machine or any user that has access to write to the HKEY_LOCAL_MACHINE registry hive and any other changes that are global to the machine.
The next way involves creating a "Registry Entries" (.reg) file:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\EscDomains]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\EscDomains\trusteddomain0.com]
"http"=dword:00000002
"https"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\EscDomains\trusteddomain1.com]
"http"=dword:00000002
"https"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\EscDomains\trusteddomain2.com]
"http"=dword:00000002
"https"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\EscDomains\trusteddomain3.com]
"http"=dword:00000002
"https"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\EscDomains\trusteddomain4.com]
"http"=dword:00000002
"https"=dword:00000002
Just like the previous script, this must also be run by a user with administrator privileges and any changes will be global on all users of the machine. You can customize this code to fit your needs. Please also make sure before deploying these that the changes will not violate your network security policy.
SkyByte Consulting provides support for many clients from small to large and everywhere in between. In the case of Microsoft SharePoint, Dynamics, and other MS enterprise products you can deploy Microsofts Threat Management Gateway (TMG) or Unified Access Gateway (UAG) which can perform reverse proxy to the sites. I hope this post will help a few admins out there with authentication annoyances and prevent un-needed service tickets.
All information presented on this blog is for informational purposes only and is provided on an as-is basis.