|17 Feb 2010||#1|
Search Providers: Best Practices on Setting the Default
This post describes a set of best practices for setting the default search provider. Our goal continues to be keeping users in control of their browser, following our published Guidelines and Requirements for add-on development.
If you write software that modifies Internet Explorerís search settings or defaults through direct registry manipulation, your software may be contributing to user confusion and frustration.
Whenever a program tries to modify the default search provider through direct registry manipulation (e.g. modifying the DefaultScope registry key directly as described in an earlier blog post ), IE8 intercepts the change and prompts users to confirm what they want:
Figure 1: In this dialog, the software requests a search default change using the recommended SetDefault API and clear attribution is displayed. In this case, it is the Contoso Internet Toolbar software.
If multiple search providers try to reset the registry key every time it changes, it causes a confusing and frustrating user experience. The above dialog box will re-appear every time the key is modified directly.
IE8 includes a Search Provider Default configuration experience designed for this scenario. When your software uses the IOpenServiceManager API (to install a search provider) and the SetDefault API (to request users set it as their default), users will see clearer communication about what is happening. This transparency is an important part of the user being in control.
The following code sample shows how to install a search provider and request that the user set it as the default using the recommended APIs.
HRESULT hr = E_FAIL;
BOOL fComInitialized = FALSE;
if (S_OK == CoInitialize(NULL))
fComInitialized = TRUE;
//Open a handle to the OpenService manager
hr = spManager.CoCreateInstance(CLSID_OpenServiceManager);
//Install my search provider
//URL-OF-SERVICE: See http://www.opensearch.org/Specificat...ption_elements
hr = spManager->InstallService(URL-OF-SERVICE, &spService);
//Request that the user changes their search default
hr = spService->SetDefault(TRUE, NULL);
When called, the SetDefault API will show the above dialog (See Figure 1 above) requesting the user to change their search default. The user can approve or deny this request from the software. If approved, the software can change the default setting. If denied, however, the software will not be allowed to change the user's default settings. The user can change the setting at any time by opening the Manage Add-ons window.
If the binary that is calling the SetDefault API is signed with a valid code signing certificate, the program name and publisher will be displayed in the Search Provider Default dialog box as in Figure 1 above. Code that calls SetDefault should be signed.
In summary, if your software monitors the DefaultScope registry key directly, please update your code to use the recommended APIs. This will allow the user to see the search provider default dialog only once and lets them be in full control of their default, in support of the Guidelines for add-on development.
If you are new to OpenSearch Extensibility and would like to learn how to offer your services or how to get started, check out the article Search Provider Extensibility in Internet Explorer.
Until next time,
Duc (Cash) Vo
|My System Specs|
|Similar help and support threads|
How do I get duckduckgo.com into search providers in Add Ons?
I want to add Duckduckgo.com search provider to the list of Search Providers in Manage Add Ons. I am using IE10 and I have looked in help but what I am being told to do does not tie up with what I am seeing on the screen. I think the answer is to get Duckduckgo into the list of Add-ons in the...
|Browsers & Mail|
Add custom search providers to IE9
Is there a way to do it? I can do it in IE8 and IE10 but not in IE9 :confused: Can anyone help?
|Browsers & Mail|
Add Search Providers to Internet Explorer
I have Windows Premium on an HP Laptop G60-535DX. Whenever I use either IE or Firefox; a tab keeps opening up "Add Search Providers to Internet Explorer". I've added all that I want. I've closed the tab, and as soon as I open a new tab, the same "Add Search Providers tab opens again. How do I stop...
|Browsers & Mail|
Windows 7 Federated Search Providers
Windows 7 Search Federation Providers With the demonstration of Windows 7`s OpenSearch Providers by Long Zheng (Flickr Search Connector for Windows 7 Search Federation) I have created these providers for Searching Youtube, Google, Google News, GoogleBlogs, MSN and Yahoo.
© Designer Media Ltd
All times are GMT -5. The time now is 04:52.