How to create custom .adm or .admx files to add search providers to the toolbar search box in Internet Explorer 7 (918238)
The information in this article applies to:
- Microsoft Internet Explorer 7.0
Important This article contains information about how to modify the
registry. Make sure to 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. MORE INFORMATIONSearchscope organization in the registryBefore 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 {searchTerms} is replaced by a
user's query. example is the designated search provider. For example,
if MSN Search is the designated search provider, the URL appears as follows:
The "Populate list of search providers" policy settingThe 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 settingWarning 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.
- 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.
- Repeat step c for each search provider that you want to add.
- Click Start, click Run, type regedit, and the click OK.
- Locate and then right-click the following registry subkey:
HKEY_CURRENT_USER\Software\Microsoft\Internet
Explorer\SearchScopes - 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. - 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\<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
[string]
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 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 "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."
- 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:
- Click Start, click Run, type regedit, and the click OK.
- Locate and then right-click the following registry subkey:
HKEY_CURRENT_USER\Software\Microsoft\Internet
Explorer\SearchScopes - Replace <VERSION> in the template file by using the data for the REG_DWORD version.
- Copy the name of the first
subkey that is listed under the SearchScopes key, and then use it to replace
<SUBKEY1> in the template.
- Copy the data strings for DisplayName and for URL, and then use these data strings to replace <NAME1> and
<URL1> in the template.
- 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\<SUBKEY1>"
VALUENAME DisplayName VALUE "<NAME1>"
VALUENAME URL VALUE "<URL1>"
END ACTIONLISTON - 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>
- Save the file as a *.adm file. For example,
save it as SearchProvider.adm.
- Verify the results. To do this, follow these steps.
- Open Group Policy Object Editor.
- 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.
- Expand Computer Configuration,
expand Administrative Templates, expand Windows
Components, and then click Internet Explorer.
- Search
for the Populate list of search providers policy setting, and then enable this policy setting.
- 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 - Expand User Configuration,
expand Administrative Templates, expand Windows
Components, and then click Internet Explorer.
- Search
for the Populate list of search providers policy setting, and then enable this policy setting.
- 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- 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="0.9" schemaVersion="0.9" 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="0.9" />
<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" />
<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)" key 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>
- 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.
- Copy the whole policy section that you have just modified and use it to replace the following text:
Insert same as user policy above - Save the file as an .admx file. For example, save it as SearchProvider.admx.
- Copy the .admx file to the
%windir%\policydefinitions folder, and then run the Group Policy Object Editor to verify the results.
How to create a SearchProvider.adml file- 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="0.9" schemaVersion="0.9" 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 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 "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>
- 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.
- Type a description to replace the "enter description here" string.
- Save the file as an .adml file. For example, save it as SearchProvider.adm1.
- Copy the .adml file
to the
%windir%\policydefinitions\language directory
folder, and then run the Group Policy Object Editor to verify the results.
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. REFERENCESFor 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, regarding the performance or reliability of these products.
Modification Type: | Major | Last Reviewed: | 10/10/2006 |
---|
Keywords: | kbExpertiseAdvanced kbhowto kbinfo KB918238 kbAudITPRO kbAudDeveloper |
---|
|
|
©2004 Microsoft Corporation. All rights reserved.
|
|