Microsoft KB Archive/918238

= How to create custom .adm or .admx files to add search providers to the toolbar search box in Internet Explorer 7 =

Article ID: 918238

Article Last Modified on 10/27/2007

-

APPLIES TO


 * Windows Internet Explorer 7

-



Important This article contains information about how to modify the registry. Make sure that you back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry



INTRODUCTION
Microsoft Internet Explorer 7 lets users select the search provider they want to use for searching the Internet. A list of search providers is available in the Internet Explorer toolbar search box. Users can add or remove search providers in this list and select a default search provider.

Actions that are related to search providers are controlled by Group Policy settings. Administrators can use Group Policy settings to restrict user behavior. Many of these settings refer to the Populate list of search providers policy setting. Administrators can provide a search provider list by using this policy setting. However, by default, this policy setting is not available. To include it, administrators must manually create the following administrative templates:
 * An .adm file for Microsoft Windows XP
 * .admx and .adml files for Microsoft Windows Vista

This article describes how to create custom .adm or .admx files to add search providers to the toolbar search box in Internet Explorer 7.



Searchscope organization in the registry
Before you add this policy to an .adm or .admx file, you must understand how search providers are organized in the registry. For example, assume that MSN, AOL, Yahoo, and Google are listed as search providers. MSN is selected as the default provider. In this example, the following registry keys are listed under the  registry subkey:

Each of these registry keys represents a search provider. The DefaultScope entry under the  key has a value that corresponds to the default search provider key. For example, in this scenario, the  key has a value that to corresponds to the MSN search registry key, or.

The search provider keys are designed to be GUIDs to make sure that each search provider has a unique identifier. We strongly recommend that these key names be GUIDs.

Each of these keys also has a DisplayName entry and a URL entry as follows:  DisplayName

This is the string that is displayed in the Internet Explorer toolbar search box. Typically, you want to keep this name short to make sure that the name is not clipped when it is displayed in the toolbar search box. For example, this name should not be longer than 16 to 20 characters. This is especially important if the user’s computer uses large fonts. URL

The search URL has the following format:

http:// .com/?q=

Note  is replaced by a user’s query. is the designated search provider. For example, if MSN Search is the designated search provider, the URL appears as follows:

http://search.msn.com/results.aspx?q=%7BsearchTerms%7D&locale=%7Blanguage%7D&FORM=I7AW



The &quot;Populate list of search providers&quot; policy setting
The Populate list of search providers policy setting lets you create a list of search providers that are then displayed in the toolbar search box of Internet Explorer 7. If you enable this policy setting and if the Restrict search providers to a specific list of search providers policy setting is also enabled, this specific list is the only list that appears. If the Add a specific list of search providers to the user’s search provider list policy setting is enabled, this particular list is added to the list of search providers. If you disable the Populate list of search providers policy setting or do not configure it, users can create their own search provider list.

The Populate list of search providers policy setting creates the required keys under the following registry subkeys and populates them by using the correct entries and values:

How to create a .adm file that includes the policy setting
Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.  Decide which search providers that you want to provide to users. Add these search providers to the registry. You can do this by adding search providers from the Internet. To do this, follow these steps:  In Internet Explorer, click the search arrow in the upper-right corner. Click Find More Providers.</li> A page opens that contains a list of supported search providers. Click to select a search provider, and then click Add Provider. This step adds the search provider to the search list. Click the search arrow again, and then verify that the newly-added search provider is present in the list.</li> Repeat step c for each search provider that you want to add.</li> Click Start, click Run, type regedit, and the click OK.</li> Locate and then right-click the following registry subkey:

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes

</li> Verify that GUIDs that represent the search providers are listed under this subkey.</li></ol>

Note You can also add your own search provider directly into the registry. In this case, create a registry key for that provider under the subkey that is listed in step 2f. Populate the key by using information that corresponds to that search provider. The GUID data is provided by the search provider.</li>  Create a policy template. To do this, open a text editor such as Notepad, and then copy the following template into the Notepad file. CLASS USER CATEGORY !!WindowsComponents CATEGORY !!InternetExplorer

POLICY !!PopulateSearchProviderList #if version >= 4 SUPPORTED !!SUPPORTED_IE7 #endif EXPLAIN !!IE_Explain_PopulateSearchProviderList KEYNAME &quot;Software\Policies\Microsoft\Internet Explorer\SearchScopes&quot; VALUENAME Version VALUEON NUMERIC <VERSION> ACTIONLISTON KEYNAME &quot;Software\Policies\Microsoft\Internet Explorer\SearchScopes&quot; VALUENAME DefaultScope VALUE &quot;<DEFAULTSUBKEY>&quot;

KEYNAME &quot;Software\Policies\Microsoft\Internet Explorer\SearchScopes\<SUBKEY1>&quot; VALUENAME DisplayName VALUE &quot;<NAME1>&quot; VALUENAME URL              VALUE &quot;<URL1>&quot; END ACTIONLISTON END POLICY END CATEGORY END CATEGORY

CLASS MACHINE CATEGORY !!WindowsComponents CATEGORY !!InternetExplorer <POLICY ... END POLICY Insert the same policy that is under class user> END CATEGORY END CATEGORY

[strings] SUPPORTED_IE7=&quot;At least Internet Explorer 7.0&quot; WindowsComponents=&quot;Windows Components&quot; InternetExplorer=&quot;Internet Explorer&quot; PopulateSearchProviderList=&quot;Populate List of search providers&quot; IE_Explain_PopulateSearchProviderList=&quot;This policy setting will allow you to populate a list of search providers that will be displayed in the Internet Explorer search box.\n\n If you enable this policy setting and if the &quot;Restrict search providers to a specific list of search providers&quot; Group Policy setting is enabled, this list will be the only list that appears in the Internet Explorer drop-down list. If the &quot;Add a specific list of search providers to the user's search provider list&quot; Group Policy setting is enabled, this list will be added to the user's list of search providers.\n\n If you disable this policy setting or do not configure it, users will have complete freedom to create their own search provider list.&quot; Note If you require a user policy, use User class. If you require a machine policy, use Machine class. </li> Populate the policy template by using the same values that populate the registry key that designates your preferred search providers. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> Click Start, click Run, type regedit, and the click OK.</li> Locate and then right-click the following registry subkey:

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes

</li> Replace <VERSION> in the template file by using the data for the REG_DWORD version.</li> Copy the name of the first subkey that is listed under the SearchScopes key, and then use it to replace <SUBKEY1> in the template.</li> Copy the data strings for DisplayName and for URL, and then use these data strings to replace <NAME1> and <URL1> in the template.</li>  For each search provider that is listed under SearchScopes, create and populate the following section of the template by repeating steps b through e. <VERSION> ACTIONLISTON KEYNAME &quot;Software\Policies\Microsoft\Internet Explorer\SearchScopes&quot; VALUENAME DefaultScope VALUE &quot;<DEFAULTSUBKEY>&quot;

KEYNAME &quot;Software\Policies\Microsoft\Internet Explorer\SearchScopes\<SUBKEY1>&quot; VALUENAME DisplayName VALUE &quot;<NAME1>&quot; VALUENAME URL              VALUE &quot;<URL1>&quot;

KEYNAME &quot;Software\Policies\Microsoft\Internet Explorer\SearchScopes\<SUBKEY2>&quot; VALUENAME DisplayName VALUE &quot;<NAME2>&quot; VALUENAME URL              VALUE &quot;<URL2>&quot; END ACTIONLISTON </li> Replace <DEFAULTSUBKEY> in the template file with one of the <SUBKEY > instances. For example, replace <DEFAULTSUBKEY> in the template file with <SUBKEY1>.</li> Copy the whole policy section that you have just created and use it to replace the following text:

<POLICY ... END POLICY Insert the same policy that is under class user>

</li></ol> </li> <li>Save the file as a *.adm file. For example, save it as SearchProvider.adm.</li> <li>Verify the results. To do this, follow these steps. <ol style="list-style-type: lower-alpha;"> <li>Open Group Policy Object Editor.</li> <li>Click Computer Configuration, expand Administrative Templates, Right-click Administrative Templates, click Add/Remove Templates, and then click Add to add the SearchProvider.adm file that you have created.</li> <li>Expand Computer Configuration, expand Administrative Templates, expand Windows Components, and then click Internet Explorer.</li> <li>Search for the Populate list of search providers policy setting, and then enable this policy setting.</li> <li>In the registry, locate and then right-click the following registry subkey to verify that you have enabled the policy:

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Internet Explorer\SearchScopes

</li> <li>Expand User Configuration, expand Administrative Templates, expand Windows Components, and then click Internet Explorer.</li> <li>Search for the Populate list of search providers policy setting, and then enable this policy setting.</li> <li>To verify this setting, locate and right-click the following registry subkey:

HKEY_CURRENT_USER\Software\policies\Microsoft\Internet Explorer\SearchScopes

</li></ol> </li></ol>

How to create an .admx file that includes the policy setting
<ol> <li> Open a text editor such as Notepad, and then copy the following template into the Notepad file. <?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> <policyDefinitions xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; revision=&quot;1.0&quot; schemaVersion=&quot;1.0&quot; xmlns=&quot;http://www.microsoft.com/GroupPolicy/PolicyDefinitions&quot;> <policyNamespaces> <target prefix=&quot;search&quot; namespace=&quot;Microsoft.Policies.search&quot; /> <using prefix=&quot;inetres&quot; namespace=&quot;Microsoft.Policies.InternetExplorer&quot; /> </policyNamespaces> <resources minRequiredRevision=&quot;1.0&quot; /> <policy name=&quot;PopulateSearchProviderList_1&quot; class=&quot;User&quot; displayName=&quot;$(string.PopulateSearchProviderList)&quot; explainText=&quot;$(string.IE_Explain_PopulateSearchProviderList)&quot; key=&quot;Software\Policies\Microsoft\Internet Explorer\SearchScopes&quot;> <parentCategory ref=&quot;inetres:InternetExplorer&quot; /> <supportedOn ref=&quot;inetres:SUPPORTED_IE7Vista&quot;/> <enabledList> <item key=&quot;Software\Policies\Microsoft\Internet Explorer\SearchScopes&quot; valueName=&quot;Version&quot;> <decimal value=&quot;VERSION&quot; /> <item key=&quot;Software\Policies\Microsoft\Internet Explorer\SearchScopes\SUBKEY1&quot; valueName=&quot;DisplayName&quot;> NAME1 <item key=&quot; Software\Policies\Microsoft\Internet Explorer\SearchScopes\SUBKEY1&quot; valueName=&quot;URL&quot;> URL1 </enabledList> <policy name=&quot;PopulateSearchProviderList_2&quot; class=&quot;Machine&quot; displayName=&quot;$(string.PopulateSearchProviderList)&quot; explainText=&quot;$(string.IE_Explain_PopulateSearchProviderList)&quot; key=&quot;Software\Policies\Microsoft\Internet Explorer\SearchScopes&quot;> <parentCategory ref=&quot;inetres:InternetExplorer&quot; /> <enabledList> Insert same as user policy above  </enabledList> </policyDefinitions> </li> <li>Replace the &quot;VERSION&quot;, &quot;NAME1&quot;, &quot;URL1&quot;, and &quot;SUBKEY1&quot; strings by using the information that you collected in step 4 of the &quot;How to create a custom .adm file that includes the policy setting&quot; section.</li> <li>Copy the whole policy section that you have just modified and use it to replace the following text:

Insert same as user policy above

</li> <li>Save the file as an .admx file. For example, save it as SearchProvider.admx.</li> <li>Copy the .admx file to the %windir%\policydefinitions folder.</li></ol>

How to create a SearchProvider.adml file
<ol> <li> Open a text editor such as Notepad, and then copy the following template into the Notepad file. <?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> <policyDefinitionResources xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; revision=&quot;1.0&quot; schemaVersion=&quot;1.0&quot; xmlns=&quot;http://www.microsoft.com/GroupPolicy/PolicyDefinitions&quot;> <displayName>enter display name here</displayName> enter description here <stringTable> <string id=&quot;PopulateSearchProviderList&quot;>Populate List of search providers <string id=&quot;IE_Explain_PopulateSearchProviderList&quot;>This policy setting will allow you to 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 &quot;Restrict search providers to a specific list of search providers&quot; Group Policy setting is enabled, this list will be the only list that appears in the Internet Explorer drop-down list. If the &quot;Add a specific list of search providers to the user's search provider list&quot; 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. </stringTable> </policyDefinitionResources> </li> <li>Replace &quot;enter display name here&quot; by using the display name that you used in step 4e of the &quot;How to create an .adm file that includes the policy setting&quot; section.</li> <li>Type a description to replace the &quot;enter description here&quot; string.</li> <li>Save the file as an .adml file. For example, save it as SearchProvider.adm1.</li> <li>Copy the .adml file to the %windir%\policydefinitions\ folder.</li></ol>

This policy setting lets you add a set of search providers to the user's default search provider list. Ordinarily, a user can add search providers during setup or by using a third-party toolbar. However, a user can also add a search provider by using the search provider's Web site. If you enable this policy setting, a user can add and remove search providers. However, a user cannot add and remove search providers from the list of search providers that you provide by using Group Policy. If you disable this policy setting or do not configure it, the user can configure the search provider list unless another policy setting restricts this configuration.

<div class="references_section">