Vista / Windows 7 Custom Google Search Engine Policy (IE7 / IE8)

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

<?xmlversion="1.0"encoding="utf-8"?><policyDefinitionResourcesxmlns: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><stringid="SUPPORTED_IE7VISTAUP">Windows Vista with IE 7 and upwards</string><stringid="PopulateSearchProviderList">Populate List of Search Providers</string><stringid="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>

<?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>

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.

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”.

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:

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!

17 Comments

Thank you! It worked perfect. I cant wait for the extended list of providers admx and adml files. I could hug you.

Gabe
on August 27, 2010 at 8:35 pm

I love you. Deeply. Truly.

For this AND for the IE7 in WinXP .adm file.

Emvy
on September 28, 2010 at 5:38 pm

But how to make Google the default?

Ben
on September 29, 2010 at 6:49 am

Hello Emvy,
If you use the “restrict search provider list” then it should make what you specified as the default, I take it you want users to still have a choice but to make the custom search the default?

Great Post. I am also having issues with defaulting. I would like to leave the users able to pick their search provider. I tried your suggestion of “restrict search provider” but for some reason I still get bing as my default search provider. I check the registry HKEY_CURRENT_USERS\Software\Policies\Microsoft\Internet Explorer\Search Scopes\ and there is a DefaultScope string setting to google_com however it is not honored. It defaults to bing. Which if you look at HKEY_CURRENT_USERS\Software\Microsoft\Internet Explorer\Search Scopes\ I see the defualtscope is set to a GUID which points to a bing installation that I did not define in my policy. Here is a copy of my policy as well.

Edit by Ben: code mangled as it got posted so i removed it

Ben
on October 6, 2010 at 3:04 pm

Hello Howard,
Thanks for your comment. The code got mangled so I removed that part of it.

The ability to set a default search engine if you’re not forcing a single provider is a bit tricky.
The registry key required cannot be set via a “policy” setting but has to be a “preference” this means that instead of going in the registry as HKCU\Software\Policy\ it goes in the normal registry location. A preference also does not get “removed” if the Group Policy is removed from a user.

The key that needs changing is “HKCU\Software\Microsoft\Internet Explorer\SearchScopes” then the REG_SZ entry called “DefaultScope”. This entry should match whatever the name of the search scope you created is…

I can have a look at describing how you would do this if you get stuck?

If I make that setting wouldn’t it permanetly make the setting. I.E. THe use may be allowed to change it for a session but on next logon it would reset back to whatever the policy has?

Ben
on October 6, 2010 at 8:50 pm

The “preference” options (not true Group Policy preferences as you find in server 2008) will apply once and then only if the policy changes or is modified. This isn’t ideal but is the only way I can think of doing it in a traditional policy without resorting to scripts of some kind… The default search policy is I think re-populated from the HKLM key so there might be a way to do something about deleting the HKCU key and letting it get pulled from the HKLM that you’ve changed. That way any policy changes wouldn’t affect the user preference.
I’ll have at think and an experiment and see if I can get anywhere…
Ben

We’re using Server 2003 here and working on a plan to migrate clients from XP to Windows 7 x64. Still using Server 2003, hence .adm files. I’ve had no luck trying to find a admx to adm converter (only adm to admx). I’ll probably have it resolved by the time you read this, but perhaps other users could benefit from an .adm version of this policy as well? 🙂

BCD
on March 2, 2011 at 5:01 pm

Hoping for some late help on this, I’ve applied this GPO but the only thing that gets created are the keys beneath SearchScopes, nothing else is populated when I click on the newly created key. Thoughts?

Ribas
on March 21, 2011 at 2:28 pm

You are the man!!! this saved me alott of work man ;-)…thank you.

Pär
on March 24, 2011 at 11:36 am

Great work, thanks a lot!

Daggi
on April 7, 2011 at 10:34 pm

It works great! But in addition I had to rename the files after I took “Save target as…”

Thank you very much indeed!

Thilo
on September 15, 2011 at 5:01 pm

How can I put more than one searchprovider in one list? I want to make a admx/aml which puts google and bing in the search provider list.

Fab
on September 15, 2011 at 11:10 pm

One thing that’s not working is the search suggestions that is unavailable for google. Is like missing ShowSearchSuggestions (Reg_DWORD) in the admx file. I’m trying to add it, but not familiar with xml code.

Rob
on October 24, 2012 at 10:19 pm

Anyone else having the issue that if you enable to “Restrict search providers to a specific list of providers” policy, the user gets an error “This operation has been cancelled due to restrictions in effect on this computer.”? The user is able to click OK, then click Set as Default (which gives the same error 2 more times) and the default is changed. Trying to get rid of these annoying errors!