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:
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
- 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"
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. - 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"
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
- Replace <DEFAULTSUBKEY> in the template file with one of the <SUBKEYx> instances. For example, replace <DEFAULTSUBKEY> in the template file with <SUBKEY1>.
- 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="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>
- 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.
Note If the specified URL contains a "&" character, you must replace the "&" with the following:
&
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}&locale={language}&FORM=I7AW
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="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>
- 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.
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.