For quite some time now one of the most popular posts on this site has been my Google search group policy item that I wrote for IE 7 on Windows XP. I thought it was probably about time to bring this up-to-date and refresh it with a policy suitable for both IE7 and IE8 on Windows Vista or Windows 7.

One of the main challenges was the fact that Microsoft have removed the .ADM file format and replaced with with two XML based definition files. Each policy definition is now split into a .admx and an .adml file. The idea is that the admx contains the configuration information and the adml provides the language definitions (i.e what is displayed in the policy editor window). This now means it is very simple to localise the policies if required.

The policy that I have created is for the Google.com search engine and includes the auto complete function so that as you type it will make guesses about your search terms. It should be very easy to modify the policy to use a different search engine if required and I will do a follow up post that runs through how to create your own search policy.

This policy also allows you to specify the search settings at either a user or machine basis depending on what you require

Populate_IE_search.admx – the policy definition file (Download)

<?xml version="1.0" encoding="utf-8"?>
<policyDefinitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="1.0" schemaVersion="1.0" xmlns="http://www.microsoft.com/GroupPolicy/PolicyDefinitions">
	<policyNamespaces>
		<target prefix="search" namespace="Microsoft.Policies.search" />
		<using prefix="inetres" namespace="Microsoft.Policies.InternetExplorer" />
	</policyNamespaces>
	<resources minRequiredRevision="1.0" />
	<supportedOn>
		<definitions>
			<!--At least Internet Explorer 7.0 and Windows Vista upwards -->
			<definition name="SUPPORTED_IE7VISTAUP" displayName="$(string.SUPPORTED_IE7VISTAUP)">
				<and>
					<range ref="products:InternetExplorer" minVersionIndex="7"/>
					<range ref="products:MicrosoftWindows" minVersionIndex="6"/>
				</and>
			</definition>
		</definitions>
	</supportedOn>
	<policies>
		<policy name="PopulateSearchProviderList_1" class="User" displayName="$(string.PopulateSearchProviderList)" explainText="$(string.IE_Explain_PopulateSearchProviderList)"  key="Software\Policies\Microsoft\Internet Explorer\SearchScopes">
			<parentCategory ref="inetres:InternetExplorer" />
			<supportedOn ref="inetres:SUPPORTED_IE7Vista"/>
			<enabledList>
				<item key="Software\Policies\Microsoft\Internet Explorer\SearchScopes" valueName="Version">
					<value>
						<decimal value="1" />
					</value>
				</item>
				<item key="Software\Policies\Microsoft\Internet Explorer\SearchScopes\Google_com" valueName="DisplayName">
					<value>
						<string>Google</string>
					</value>	
				</item>	
				<item key="Software\Policies\Microsoft\Internet Explorer\SearchScopes\Google_com" valueName="URL">
					<value>
						<string>http://www.google.com/search?q={searchTerms}&amp;rls=com.microsoft:{language}&amp;ie={inputEncoding}&amp;oe={outputEncoding}&amp;startIndex={startIndex?}&amp;startPage={startPage}</string>
					</value>
				</item>
				<item key="Software\Policies\Microsoft\Internet Explorer\SearchScopes\Google_com" valueName="FaviconURL">
					<value>
						<string>http://www.google.com/favicon.ico</string>
					</value>
				</item>				
				<item key="Software\Policies\Microsoft\Internet Explorer\SearchScopes\Google_com" valueName="SuggestionsURL">
					<value>
						<string>http://clients5.google.com/complete/search?q={searchTerms}&amp;client=ie8&amp;mw={ie:maxWidth}&amp;sh={ie:sectionHeight}&amp;rh={ie:rowHeight}&amp;inputencoding={inputEncoding}&amp;outputencoding={outputEncoding}</string>
					</value>
				</item>
			</enabledList>
		</policy>
		<policy name="PopulateSearchProviderList_2" class="Machine" displayName="$(string.PopulateSearchProviderList)" explainText="$(string.IE_Explain_PopulateSearchProviderList)" key="Software\Policies\Microsoft\Internet Explorer\SearchScopes">
			<parentCategory ref="inetres:InternetExplorer" />
			<supportedOn ref="inetres:SUPPORTED_IE7Vista"/>
			<enabledList>
				<item key="Software\Policies\Microsoft\Internet Explorer\SearchScopes" valueName="Version">
					<value>
						<decimal value="1" />
					</value>
				</item>
				<item key="Software\Policies\Microsoft\Internet Explorer\SearchScopes\Google_com" valueName="DisplayName">
					<value>
						<string>Google</string>
					</value>	
				</item>	
				<item key="Software\Policies\Microsoft\Internet Explorer\SearchScopes\Google_com" valueName="URL">
					<value>
						<string>http://www.google.com/search?q={searchTerms}&amp;rls=com.microsoft:{language}&amp;ie={inputEncoding}&amp;oe={outputEncoding}&amp;startIndex={startIndex?}&amp;startPage={startPage}</string>
					</value>
				</item>
				<item key="Software\Policies\Microsoft\Internet Explorer\SearchScopes\Google_com" valueName="FaviconURL">
					<value>
						<string>http://www.google.com/favicon.ico</string>
					</value>
				</item>				
				<item key="Software\Policies\Microsoft\Internet Explorer\SearchScopes\Google_com" valueName="SuggestionsURL">
					<value>
						<string>http://clients5.google.com/complete/search?q={searchTerms}&amp;client=ie8&amp;mw={ie:maxWidth}&amp;sh={ie:sectionHeight}&amp;rh={ie:rowHeight}&amp;inputencoding={inputEncoding}&amp;outputencoding={outputEncoding}</string>
					</value>
				</item>
			</enabledList>
		</policy> 
	</policies>
</policyDefinitions>

Populate_IE_search.adml – the policy language definition file (Download)

<?xml version="1.0" encoding="utf-8"?>
<policyDefinitionResources xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="1.0" schemaVersion="1.0" xmlns="http://www.microsoft.com/GroupPolicy/PolicyDefinitions">
  <displayName>IE8 Search Policy</displayName>
  <description>Add Google to the search box for IE7 or IE 8</description>
  <resources>
    <stringTable>
	<string id="SUPPORTED_IE7VISTAUP">Windows Vista with IE 7 and upwards</string>
      <string id="PopulateSearchProviderList">Populate List of Search Providers</string>
      <string id="IE_Explain_PopulateSearchProviderList">This policy setting will let you populate a list of search providers that will be displayed in Internet Explorer's search box.
 
If you enable this policy setting and if the "Restrict search providers to a specific list of search providers" Group Policy setting is enabled, this list will be the only list that appears in the Internet Explorer drop-down list. If the "Add a specific list of search providers to the user's search provider list" Group Policy setting is enabled, this list will be added to the user's list of search providers.
 
If you disable this policy setting or do not configure it, users will have complete freedom to create their own search provider list.</string>
    </stringTable>
  </resources>
</policyDefinitionResources>

To test these out locally copy the files to the following location:

admx: %windir%\PolicyDefinitions

adml: %windir%\PolicyDefinitions\en-US

You should then be able to open gpedit.msc and browse to:

(user or computer configuration)\Administrative Templates\Windows Components\Internet Explorer\

The setting is called “Populate List of Search Providers

image

It is important that when you enable this policy it will not work on its own! You have to make a choice about how to implement your additional search providers.

If you only want users to have the search provider specified in the policy then you need to enable the “Restrict search providers to a specific list of providers” policy as well.

image Restricted to just the policy provider

If you want to allow users to customise their provider list or be allowed to add more then you need to enable “Add a specific list of search providers to the user’s search provider list”.

image

Added but user customisable

It is very important that one or the other of these extra settings is enabled otherwise you wont see your custom search provider.

To implement this on a domain in a proper group policy you will need to copy the admx/l files to the domain “Central Store” and then you can include them in a domain policy. For more information about the Central Store have a look here:

http://technet.microsoft.com/en-us/library/cc748955%28WS.10%29.aspx

As I said I’ll do a follow up post that runs through how to create your own custom search policy for as many providers as you want or using localised versions of your favourite search engine. In the mean time, let me know how you get on!