<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Nefaria.com &#187; registry</title>
	<atom:link href="http://nefaria.com/tag/registry/feed/" rel="self" type="application/rss+xml" />
	<link>http://nefaria.com</link>
	<description>☠ ☠ ☠ ☠ ☠ ☠</description>
	<lastBuildDate>Mon, 12 Mar 2012 14:03:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Adding &#8220;Trusted Sites&#8221; to Internet Explorer, via the registry</title>
		<link>http://nefaria.com/2009/10/adding-trusted-sites-for-ie-via-the-registry/</link>
		<comments>http://nefaria.com/2009/10/adding-trusted-sites-for-ie-via-the-registry/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 18:28:57 +0000</pubDate>
		<dc:creator>musashi</dc:creator>
				<category><![CDATA[I.T.]]></category>
		<category><![CDATA[registry]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://nefaria.com/?p=702</guid>
		<description><![CDATA[A while ago I needed to add a list of websites to the Internet Explorer&#8217;s &#8220;Trusted Sites&#8221; zone for multiple users, scattered across multiple terminal servers. IE&#8217;s &#8220;Enhanced Security Configuration&#8221; (ESC) is configured by default on windows terminal services and it&#8217;s normally a good idea to leave it intact. However, this can have unintended consequences [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago I needed to add a list of websites to the Internet Explorer&#8217;s &#8220;Trusted Sites&#8221; zone for multiple users, scattered across multiple terminal servers. IE&#8217;s &#8220;Enhanced Security Configuration&#8221; (ESC) is configured by default on windows terminal services and it&#8217;s normally a good idea to leave it intact. </p>
<p>However, this can have unintended consequences for users who require the use of websites that employ ActiveX, javascript, etc. because, by default, ESC does not allow those items to run. Sometimes, this means that the site in question will only be partially non-functioning. Other times, the entire site will be completely unusable. Furthermore, most users on terminal services have only a limited ability to actually modify the settings for an entire zone. Normally the best thing they can do is add the site to their trusted sites zone, if in fact the site is legitimate (i.e., &#8220;trusted&#8221;). </p>
<p>Originally, I explained to the users the steps involved in adding a site to their trusted sites, however many of the users used many of the same websites that other users were using. Also, new users needed to be trained on how to do this as well. Needless to say, it got very repetitive, very fast; so I came up with a &#8220;global&#8221; list of sites that can be trusted, and imported them to the registry on each terminal server. The list consisted of about 40+ sites, and I was able to generate the list mostly by exporting the following registry key:</p>
<div class="code_block">
<pre>
HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\EscDomains
</pre>
</div>
<p>&#8230;from a few user accounts who had already added most of the sites to their trusted sites zone. After grepping out the duplicates (among other things), I had my list.</p>
<p>Now, I&#8217;m going to cover two ways of making this list of domains &#8220;globally trusted&#8221;&#8212;both of them involve writing to the following registry key:</p>
<div class="code_block">
<pre>
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\EscDomains
</pre>
</div>
<p>Pay attention! This is not the same key as previously mentioned. This key resides in the &#8216;HKEY_LOCAL_MACHINE&#8217; hive, whereas the previous key resides in the &#8216;HKEY_CURRENT_USER&#8217; hive.</p>
<p>The first way is via the following visual basic script:</p>
<div class="code_block">
<pre>
<font color="#ffff00">Option</font>&nbsp;<font color="#ffff00">Explicit</font>

<font color="#ffff00">Dim</font>&nbsp;DomainArray<font color="#ffff00">(</font><font color="#ff6060">5</font><font color="#ffff00">),</font>&nbsp;strComputer<font color="#ffff00">,</font>&nbsp;strHTTP<font color="#ffff00">,</font>&nbsp;strHTTPS
<font color="#ffff00">Dim</font>&nbsp;dwordZone<font color="#ffff00">,</font>&nbsp;regPath<font color="#ffff00">,</font>&nbsp;objReg<font color="#ffff00">,</font>&nbsp;counter<font color="#ffff00">,</font>&nbsp;subkeyPath
<font color="#ffff00">Dim</font>&nbsp;subkeyValue
<font color="#ffff00">Const</font>&nbsp;HKEY_LOCAL_MACHINE <font color="#ffff00">=</font>&nbsp;<font color="#ffff00">&amp;</font>H80000002

DomainArray<font color="#ffff00">(</font><font color="#ff6060">0</font><font color="#ffff00">)</font>&nbsp;<font color="#ffff00">=</font>&nbsp;<font color="#ff6060">&quot;testdomain0.com&quot;</font>
DomainArray<font color="#ffff00">(</font><font color="#ff6060">1</font><font color="#ffff00">)</font>&nbsp;<font color="#ffff00">=</font>&nbsp;<font color="#ff6060">&quot;testdomain1.com&quot;</font>
DomainArray<font color="#ffff00">(</font><font color="#ff6060">2</font><font color="#ffff00">)</font>&nbsp;<font color="#ffff00">=</font>&nbsp;<font color="#ff6060">&quot;testdomain2.com&quot;</font>
DomainArray<font color="#ffff00">(</font><font color="#ff6060">3</font><font color="#ffff00">)</font>&nbsp;<font color="#ffff00">=</font>&nbsp;<font color="#ff6060">&quot;testdomain3.com&quot;</font>
DomainArray<font color="#ffff00">(</font><font color="#ff6060">4</font><font color="#ffff00">)</font>&nbsp;<font color="#ffff00">=</font>&nbsp;<font color="#ff6060">&quot;testdomain4.com&quot;</font>

strComputer <font color="#ffff00">=</font>&nbsp;<font color="#ff6060">&quot;.&quot;</font>
strHTTP <font color="#ffff00">=</font>&nbsp;<font color="#ff6060">&quot;http&quot;</font>
strHTTPS <font color="#ffff00">=</font>&nbsp;<font color="#ff6060">&quot;https&quot;</font>
dwordZone <font color="#ffff00">=</font>&nbsp;<font color="#ff6060">&quot;2&quot;</font>
regPath <font color="#ffff00">=</font>&nbsp;<font color="#ff6060">&quot;SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings&quot;</font>&nbsp;<font color="#ffff00">&amp;</font>_
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#ff6060">&quot;\ZoneMap\EscDomains\&quot;</font>
<font color="#ffff00">Set</font>&nbsp;objReg <font color="#ffff00">=</font>&nbsp;<font color="#00ffff">GetObject</font><font color="#ffff00">(</font><font color="#ff6060">&quot;winmgmts:{impersonationLevel = impersonate}!\\&quot;</font>&nbsp;<font color="#ffff00">&amp; _</font>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;strComputer <font color="#ffff00">&amp;</font>&nbsp;<font color="#ff6060">&quot;\root\default:StdRegProv&quot;</font><font color="#ffff00">)</font>

<font color="#ffff00">For</font>&nbsp;counter <font color="#ffff00">=</font>&nbsp;<font color="#ff6060">0</font>&nbsp;<font color="#ffff00">to</font>&nbsp;<font color="#ff6060">4</font>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;subkeyPath <font color="#ffff00">=</font>&nbsp;regPath <font color="#ffff00">&amp;</font>&nbsp;DomainArray<font color="#ffff00">(</font>counter<font color="#ffff00">)</font>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;objReg<font color="#ffff00">.</font>CreateKey HKEY_LOCAL_MACHINE<font color="#ffff00">,</font>subkeyPath
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;objReg<font color="#ffff00">.</font>SetDWORDValue HKEY_LOCAL_MACHINE<font color="#ffff00">,</font>subkeyPath<font color="#ffff00">,</font>strHTTP<font color="#ffff00">,</font>dwordZone
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;objReg<font color="#ffff00">.</font>SetDWORDValue HKEY_LOCAL_MACHINE<font color="#ffff00">,</font>subkeyPath<font color="#ffff00">,</font>strHTTPS<font color="#ffff00">,</font>dwordZone
<font color="#ffff00">Next</font>
</pre>
</div>
<p>This script will insert &#8216;testdomain0.com&#8217;, &#8216;testdomain1.com&#8217;, [...] into IE&#8217;s trusted sites zone when run on any machine. It must be run by an Administrator (or another user who has access to write to the HKEY_LOCAL_MACHINE registry hive), and the changes are global (to the machine).</p>
<p>The next way involves creating a &#8220;registry entries&#8221; (.reg) file:</p>
<div class="code_block">
<pre>
Windows Registry Editor Version 5<font color="#ff40ff">.</font>00

[<font color="#ff6060">HKEY_LOCAL_MACHINE</font><font color="#ff40ff">\</font>SOFTWARE<font color="#ff40ff">\</font>Microsoft<font color="#ff40ff">\</font>Windows<font color="#ff40ff">\</font>CurrentVersion<font color="#ff40ff">\</font>Internet Settings<font color="#ff40ff">\</font>ZoneMap<font color="#ff40ff">\</font>EscDomains]

[<font color="#ff6060">HKEY_LOCAL_MACHINE</font><font color="#ff40ff">\</font>SOFTWARE<font color="#ff40ff">\</font>Microsoft<font color="#ff40ff">\</font>Windows<font color="#ff40ff">\</font>CurrentVersion<font color="#ff40ff">\</font>Internet Settings<font color="#ff40ff">\</font>ZoneMap<font color="#ff40ff">\</font>EscDomains<font color="#ff40ff">\</font>testdomain0<font color="#ff40ff">.</font>com]
&quot;http&quot;=<font color="#ff6060">dword</font><font color="#ff40ff">:</font><font color="#ff6060">00000002</font>
&quot;https&quot;=<font color="#ff6060">dword</font><font color="#ff40ff">:</font><font color="#ff6060">00000002</font>

[<font color="#ff6060">HKEY_LOCAL_MACHINE</font><font color="#ff40ff">\</font>SOFTWARE<font color="#ff40ff">\</font>Microsoft<font color="#ff40ff">\</font>Windows<font color="#ff40ff">\</font>CurrentVersion<font color="#ff40ff">\</font>Internet Settings<font color="#ff40ff">\</font>ZoneMap<font color="#ff40ff">\</font>EscDomains<font color="#ff40ff">\</font>testdomain1<font color="#ff40ff">.</font>com]
&quot;http&quot;=<font color="#ff6060">dword</font><font color="#ff40ff">:</font><font color="#ff6060">00000002</font>
&quot;https&quot;=<font color="#ff6060">dword</font><font color="#ff40ff">:</font><font color="#ff6060">00000002</font>

[<font color="#ff6060">HKEY_LOCAL_MACHINE</font><font color="#ff40ff">\</font>SOFTWARE<font color="#ff40ff">\</font>Microsoft<font color="#ff40ff">\</font>Windows<font color="#ff40ff">\</font>CurrentVersion<font color="#ff40ff">\</font>Internet Settings<font color="#ff40ff">\</font>ZoneMap<font color="#ff40ff">\</font>EscDomains<font color="#ff40ff">\</font>testdomain2<font color="#ff40ff">.</font>com]
&quot;http&quot;=<font color="#ff6060">dword</font><font color="#ff40ff">:</font><font color="#ff6060">00000002</font>
&quot;https&quot;=<font color="#ff6060">dword</font><font color="#ff40ff">:</font><font color="#ff6060">00000002</font>

[<font color="#ff6060">HKEY_LOCAL_MACHINE</font><font color="#ff40ff">\</font>SOFTWARE<font color="#ff40ff">\</font>Microsoft<font color="#ff40ff">\</font>Windows<font color="#ff40ff">\</font>CurrentVersion<font color="#ff40ff">\</font>Internet Settings<font color="#ff40ff">\</font>ZoneMap<font color="#ff40ff">\</font>EscDomains<font color="#ff40ff">\</font>testdomain3<font color="#ff40ff">.</font>com]
&quot;http&quot;=<font color="#ff6060">dword</font><font color="#ff40ff">:</font><font color="#ff6060">00000002</font>
&quot;https&quot;=<font color="#ff6060">dword</font><font color="#ff40ff">:</font><font color="#ff6060">00000002</font>

[<font color="#ff6060">HKEY_LOCAL_MACHINE</font><font color="#ff40ff">\</font>SOFTWARE<font color="#ff40ff">\</font>Microsoft<font color="#ff40ff">\</font>Windows<font color="#ff40ff">\</font>CurrentVersion<font color="#ff40ff">\</font>Internet Settings<font color="#ff40ff">\</font>ZoneMap<font color="#ff40ff">\</font>EscDomains<font color="#ff40ff">\</font>testdomain4<font color="#ff40ff">.</font>com]
&quot;http&quot;=<font color="#ff6060">dword</font><font color="#ff40ff">:</font><font color="#ff6060">00000002</font>
&quot;https&quot;=<font color="#ff6060">dword</font><font color="#ff40ff">:</font><font color="#ff6060">00000002</font>
</pre>
</div>
<p>Just like the previous script, this must also be run by a user with Administrator privileges and any changes will be global to all users on the machine.</p>
<p>(Of course, you would want to customize these snippets of code to suit your needs.)</p>
<p>For more information, please visit the following sites:</p>
<p><a href="http://support.microsoft.com/kb/815141">Internet Explorer Enhanced Security Configuration changes the browsing experience</a><br />
<a href="http://msdn.microsoft.com/en-us/library/ms537180(VS.85).aspx">Enhanced Security Configuration for Internet Explorer</a><br />
<a href="http://support.microsoft.com/kb/182569">Internet Explorer security zones registry entries for advanced users</a></p>
]]></content:encoded>
			<wfw:commentRss>http://nefaria.com/2009/10/adding-trusted-sites-for-ie-via-the-registry/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

