Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

Introduction

Windows Internet Explorer 7 lets users select the search provider that 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 they can also 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 Windows XP
  • .admx and .adml files for 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.

↑ Back to the top


More information

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
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes
registry subkey:
  • {2FEDD0BC-4D55-413C-8B59-BFE70133A2CB}
  • {48317BDF-84E9-4424-9121-81982CDACF5F}
  • {C5E5478F-4C76-4267-B372-2205ADBE3FB0}
  • {D14069E7-AD20-461D-BC73-19D9F1DB2ADB}
Each of these registry keys represents a search provider. The DefaultScope entry under the
SearchScopes
key has a value that corresponds to the default search provider key. For example, in this scenario, the
SearchScopes
key has a value that to corresponds to the MSN search registry key, or
{C5E5478F-4C76-4267-B372-2205ADBE3FB0}
.

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://example.com/?q={searchTerms}
    Note The {searchTerms} placeholder is replaced by the user�s query. And the example placeholder represents the designated search provider. For example, if MSN Search is the designated search provider, the URL is displayed as follows:

The "Populate list of search providers" 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:
HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\SearchScopes
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Internet Explorer\SearchScopes

How to create a .adm file that includes the policy setting

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756� How to back up and restore the registry in Windows
  1. Decide which search providers that you want to provide to users.
  2. Add these search providers to the registry. You can do this by adding search providers from the Internet. To do this, follow these steps:
    1. In Internet Explorer, click the search arrow in the upper-right corner.
    2. Click Find More Providers.
    3. 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.
    4. Repeat step c for each search provider that you want to add.
    5. Click Start, click Run, type regedit, and the click OK.
    6. Locate and then right-click the following registry subkey:
      HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes
    7. Verify that GUIDs that represent the search providers are listed under this subkey.
    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.
  3. 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 "Software\Policies\Microsoft\Internet Explorer\SearchScopes"
    			VALUENAME Version
    			VALUEON NUMERIC <VERSION>
       ACTIONLISTON
    KEYNAME "Software\Policies\Microsoft\Internet Explorer\SearchScopes"
    			     	 VALUENAME DefaultScope	VALUE "<DEFAULTSUBKEY>"
    
    				KEYNAME "Software\Policies\Microsoft\Internet Explorer\SearchScopes\<SUBKEY1>"
    				VALUENAME DisplayName  VALUE "<NAME1>"	
    				VALUENAME URL               VALUE "<URL1>"
    			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="At least Internet Explorer 7.0"
    WindowsComponents="Windows Components"
    InternetExplorer="Internet Explorer"
    PopulateSearchProviderList="Populate List of search providers"
    IE_Explain_PopulateSearchProviderList="This policy setting will let you 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 "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.\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."
    
    Note If you require a user policy, use User class. If you require a machine policy, use Machine class.
  4. 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:
    1. Click Start, click Run, type regedit, and the click OK.
    2. Locate and then right-click the following registry subkey:
      HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes
    3. Replace <VERSION> in the template file by using the data for the REG_DWORD version.
    4. Copy the name of the first subkey that is listed under the SearchScopes key, and then use it to replace <SUBKEY1> in the template.
    5. Copy the data strings for DisplayName and for URL, and then use these data strings to replace <NAME1> and <URL1> in the template.
    6. 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 "Software\Policies\Microsoft\Internet Explorer\SearchScopes"
      			     	 VALUENAME DefaultScope	VALUE "<DEFAULTSUBKEY>"
      
      				KEYNAME "Software\Policies\Microsoft\Internet Explorer\SearchScopes\<SUBKEY1>"
      				VALUENAME DisplayName  VALUE "<NAME1>"	
      				VALUENAME URL               VALUE "<URL1>"
      
      KEYNAME "Software\Policies\Microsoft\Internet Explorer\SearchScopes\<SUBKEY2>"
      				VALUENAME DisplayName  VALUE "<NAME2>"	
      				VALUENAME URL               VALUE "<URL2>"
      			END ACTIONLISTON
    7. Replace <DEFAULTSUBKEY> in the template file with one of the <SUBKEYx> instances. For example, replace <DEFAULTSUBKEY> in the template file with <SUBKEY1>.
    8. 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>
  5. Save the file as a *.adm file. For example, save it as SearchProvider.adm.
  6. Verify the results. To do this, follow these steps.
    1. Open Group Policy Object Editor.
    2. 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.
    3. Expand Computer Configuration, expand Administrative Templates, expand Windows Components, and then click Internet Explorer.
    4. Search for the Populate list of search providers policy setting, and then enable this policy setting.
    5. 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
    6. Expand User Configuration, expand Administrative Templates, expand Windows Components, and then click Internet Explorer.
    7. Search for the Populate list of search providers policy setting, and then enable this policy setting.
    8. To verify this setting, locate and right-click the following registry subkey:
      HKEY_CURRENT_USER\Software\policies\Microsoft\Internet Explorer\SearchScopes

How to create an .admx file that includes the policy setting

  1. Open a text editor such as Notepad, and then copy the following template into the Notepad file.
    <?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" />
      <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="VERSION" />
                </value>
            </item>
            <item key="Software\Policies\Microsoft\Internet Explorer\SearchScopes\SUBKEY1" valueName="DisplayName">
                <value>
                    <string>NAME1</string>
                </value>	
            </item>	
            <item key="Software\Policies\Microsoft\Internet Explorer\SearchScopes\SUBKEY1" valueName="URL">
                <value>
                    <string>URL1</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" />
                      <enabledList>  Insert same as user policy above  </enabledList> 
          </policy> 
      </policies>
    </policyDefinitions>
    
  2. Replace the "VERSION," "NAME1," "URL1," and "SUBKEY1" strings by using the information that you collected in step 4 of the "How to create a custom .adm file that includes the policy setting" section.
  3. Copy the whole policy section that you have just modified and use it to replace the following text:
    Insert same as user policy above
  4. Save the file as an .admx file. For example, save it as SearchProvider.admx.
  5. Copy the .admx file to the %windir%\policydefinitions folder.
Note If the specified URL contains a "&" character, you must replace the "&" with the following:
&amp;
This is because "&" is a special character in XML.

For example, if the search URL is "http://search.msn.com/results.aspx?g={searchTerms}&locale={language}&FORM=I7AW," you must enter the following search URL in the .admx file:
http://search.msn.com/results.aspx?g={searchTerms}&amp;locale={language}&amp;FORM=I7AW

How to create a SearchProvider.adml file

  1. Open a text editor such as Notepad, and then copy the following template into the Notepad file.
    <?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>enter display name here</displayName>
      <description>enter description here</description>
      <resources>
        <stringTable>
          <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>
    
  2. Replace "enter display name here" by using the display name that you used in step 4e of the "How to create an .adm file that includes the policy setting" section.
  3. Type a description to replace the "enter description here" string.
  4. Save the file as an .adml file. For example, save it as SearchProvider.adm1.
  5. Copy the .adml file to the %windir%\policydefinitions\language directory folder.
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.

↑ Back to the top


References

For more information, visit the following Microsoft Web sites:The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, about the performance or reliability of these products.

↑ Back to the top


Keywords: KB918238, kbinfo, kbhowto, kbexpertiseadvanced

↑ Back to the top

Article Info
Article ID : 918238
Revision : 8
Created on : 9/24/2009
Published on : 9/24/2009
Exists online : False
Views : 443