![Internet Explorer 8 中的默认搜索提供程序通过 GP?](https://linux22.com/image/498347/Internet%20Explorer%208%20%E4%B8%AD%E7%9A%84%E9%BB%98%E8%AE%A4%E6%90%9C%E7%B4%A2%E6%8F%90%E4%BE%9B%E7%A8%8B%E5%BA%8F%E9%80%9A%E8%BF%87%20GP%EF%BC%9F.png)
有人知道如何通过组策略更改 IE8 中的默认搜索提供程序吗?
IE7 似乎运行正常,但是一旦我通过 WSUS 推出 IE8 浏览器更新,它就会在所有客户端上默认恢复为 Bing 搜索,这是通过组策略完成的。
我发现有些人制作自定义 adm 模板来改变 Google 上的这种行为,但我无法得到直接的答案。
答案1
为了在通过 WSUS/组策略部署 IE8 时配置搜索提供程序,您可能希望首先修改现有的 ADM 文件以支持 IE8 的新搜索建议和网站图标功能。我们为我们的环境创建的 ADM 文件附在本文底部;您应该能够修改它以满足您自己的需求。
完成此操作后,您需要意识到 IE8 安装程序与之前的 IE7 安装程序之间的一个主要区别是 IE8 安装程序会填充以下注册表值,而 IE7 安装程序则不会:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\SearchScopes]
"DefaultScope"="{0633EE93-D776-472f-A0FF-E1416B8B2E3A}"
这是 Live Search/Bing 的默认 GUID,当用户安装 IE8 后首次登录时,该值将被复制到用户配置文件中的以下位置:
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes]
"DefaultScope"="<whatever the HKLM entry was>"
并用于设置默认搜索提供程序。这就是为什么以前设置默认搜索提供程序的方法(例如设置最低 GUID 和/或使用字母数字字符串代替 GUID)默认情况下不再起作用的原因。
我发现设置网络默认搜索提供商的最佳方式是删除在登录/启动脚本中从“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\SearchScopes”中删除“DefaultScope”注册表值,然后使用旧方法设置首选默认搜索提供程序以使用 ADM 文件中的最低 GUID 和/或字母数字字符串。请确保不要删除整个 SearchScopes 键,因为这可能会导致 IE8 在某些情况下崩溃;只需删除值本身,即:
reg delete "HKLM\SOFTWARE\Microsoft\Internet Explorer\SearchScopes" /v DefaultScope /f
您可能还希望将 HKCU DefaultScope 值设置为您首选搜索提供商的 GUID,但请注意,一旦 IE8 运行一次,它就会将 DefaultScope 值的设置以二进制格式保存在另一个位置,您无法更改:
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\User Preferences]
如果您在 IE 已运行时尝试通过修改 HKCU DefaultScope 键来更改默认搜索提供程序,则下次您尝试使用搜索提供程序时,您将收到一条消息,提示“您计算机上的程序已为 Internet Explorer 建议了新的默认搜索提供程序”,并让用户可以选择更改回来。这似乎是 IE8 中“防止程序建议更改我的默认搜索提供程序”功能的一部分,我不知道有什么办法可以绕过它。因此,如果您想避免给用户带来烦人的提示,您需要确保第一次就正确设置此注册表项。
针对搜索提供商的更新 ADM 文件(包括搜索建议和网站图标)如下:
; Based on 'Group Policy Search Providers ADM File', provided by schema_mangler
; Posted to microsoft.public.internetexplorer.general on 17 Nov 2006, 22:52
; Search Google Groups for the original, and see http://support.microsoft.com/kb/918238
; CRGS version changes:
; Tidied up unnecessary [strings]
; Changed Bing, Google, Yahoo, Ask to latest versions, added Search Suggestions
; Added Amazon UK, eBay, Wikipedia via Microsoft site
; Also set the Google GUID to the lowest value, so that it is default
CLASS USER
CATEGORY !!WindowsComponents
CATEGORY !!InternetExplorer
POLICY !!PopulateSearchProviderList
#if version >= 4
SUPPORTED !!SUPPORTED_IE7
#endif
EXPLAIN !!Search_Explain
KEYNAME "Software\Policies\Microsoft\Internet Explorer\SearchScopes"
VALUENAME Version
VALUEON NUMERIC 3
PART "Live Search" CHECKBOX
VALUENAME LiveChoice
ACTIONLISTON
KEYNAME "Software\Policies\Microsoft\Internet Explorer\SearchScopes\{0633EE93-D776-472f-A0FF-E1416B8B2E3A}"
VALUENAME DisplayName VALUE "@ieframe.dll,-12512"
VALUENAME URL VALUE "http://search.live.com/results.aspx?q={searchTerms}&src={referrer:source?}"
END ACTIONLISTON
END PART
PART "Bing" CHECKBOX
VALUENAME BingChoice
ACTIONLISTON
KEYNAME "Software\Policies\Microsoft\Internet Explorer\SearchScopes\{A6CF48A4-CC6B-46CA-B51A-AA3B0DC46532}"
VALUENAME Codepage VALUE NUMERIC 65001
VALUENAME DisplayName VALUE "Bing"
VALUENAME FaviconURL VALUE "http://www.bing.com/favicon.ico"
VALUENAME FaviconURLFallback VALUE "http://www.bing.com/favicon.ico"
VALUENAME ShowSearchSuggestions VALUE NUMERIC 1
VALUENAME ShowTopResult VALUE NUMERIC 0
VALUENAME SuggestionsURL VALUE "http://api.bing.com/qsml.aspx?query={searchTerms}&market={Language}&form=IE8SSC&maxwidth={ie:maxWidth}&rowheight={ie:rowHeight}§ionHeight={ie:sectionHeight}"
VALUENAME SuggestionsURLFallback VALUE "http://api.bing.com/qsml.aspx?query={searchTerms}&maxwidth={ie:maxWidth}&rowheight={ie:rowHeight}§ionHeight={ie:sectionHeight}&FORM=IE11SS&market={language}"
VALUENAME TopResultURL VALUE "http://www.bing.com/search?q={searchTerms}&src=ie9tr"
VALUENAME TopResultURLFallback VALUE "http://www.bing.com/search?q={searchTerms}&src=IE-TopResult&FORM=IE11TR"
VALUENAME URL VALUE "http://www.bing.com/search?q={searchTerms}&form=IE8SRC&src=IE-SearchBox"
END ACTIONLISTON
END PART
PART "Google" CHECKBOX
VALUENAME GoogleChoice
ACTIONLISTON
KEYNAME "Software\Policies\Microsoft\Internet Explorer\SearchScopes\{012E1000-F331-11DB-8314-0800200C9A66}"
VALUENAME DisplayName VALUE "Google"
VALUENAME FaviconURL VALUE "http://www.google.com/favicon.ico"
VALUENAME ShowSearchSuggestions VALUE NUMERIC 1
VALUENAME SuggestionsURL VALUE "http://clients5.google.com/complete/search?q={searchTerms}&client=ie8&mw={ie:maxWidth}&sh={ie:sectionHeight}&rh={ie:rowHeight}&inputencoding={inputEncoding}&outputencoding={outputEncoding}"
VALUENAME URL VALUE "http://www.google.com/search?q={searchTerms}&sourceid=ie7&rls=com.microsoft:{language}:{referrer:source}&ie={inputEncoding?}&oe={outputEncoding?}"
END ACTIONLISTON
END PART
PART "Yahoo" CHECKBOX
VALUENAME YahooChoice
ACTIONLISTON
KEYNAME "Software\Policies\Microsoft\Internet Explorer\SearchScopes\{5A0025DA-7BEA-4F98-B987-298BCF7A396C}"
VALUENAME DisplayName VALUE "Yahoo!"
VALUENAME FaviconURL VALUE "http://search.yahoo.com/favicon.ico"
VALUENAME ShowSearchSuggestions VALUE NUMERIC 1
VALUENAME SuggestionsURL VALUE "http://ie.search.yahoo.com/os?appid=ie8&command={searchTerms}"
VALUENAME URL VALUE "http://search.yahoo.com/search?p={searchTerms}&b={startPage?}&fr=ie8"
END ACTIONLISTON
END PART
PART "Ask Jeeves" CHECKBOX
VALUENAME AskChoice
ACTIONLISTON
KEYNAME "Software\Policies\Microsoft\Internet Explorer\SearchScopes\{FB7569CA-999B-4C43-A9EE-F85AC0982157}"
VALUENAME DisplayName VALUE "Ask.com"
VALUENAME FaviconURL VALUE "http://sp.uk.ask.com/favicon.ico"
VALUENAME ShowSearchSuggestions VALUE NUMERIC 1
VALUENAME SuggestionsURL_JSON VALUE "http://ss.uk.ask.com/query?q={searchTerms}&li=ff"
VALUENAME URL VALUE "http://wzeu.ask.com/r?t=v&d=eu&s=uk&l=dir&u=http://uk.ask.com/web?q={searchTerms}&iesrc={referrer:source?}&qsrc=3032&l=dir&o=379"
END ACTIONLISTON
END PART
PART "Amazon (UK)" CHECKBOX
VALUENAME AmazonUKChoice
ACTIONLISTON
KEYNAME "Software\Policies\Microsoft\Internet Explorer\SearchScopes\{09AF8371-3F02-48AE-B039-21576F8A57E5}"
VALUENAME Codepage VALUE NUMERIC 65001
VALUENAME DisplayName VALUE "Amazon (UK)"
VALUENAME FaviconURL VALUE "http://g-ecx.images-amazon.com/images/G/01/Associates/Apps/Search/favicon._V230744766_.ico"
VALUENAME ShowSearchSuggestions VALUE NUMERIC 1
VALUENAME SuggestionsURL VALUE "http://asp.assoc-amazon.co.uk/suggestions?q={searchTerms}&t=amznsearch.uk.ms.vs-21"
VALUENAME SuggestionsURL_JSON VALUE "http://completion.amazon.co.uk/search/complete?method=completion&q={searchTerms}&search-alias=aps&client=amzn-search-suggestions/9fe582406fb5106f343a84083d78795713c12d68&mkt=3"
VALUENAME URL VALUE "http://www.amazon.co.uk/s/ref=azs_osd_ieauk?ie=UTF-8&tag=amznsearch.uk.ms-21&link%5Fcode=qs&index=aps&field-keywords={searchTerms}"
END ACTIONLISTON
END PART
PART "eBay" CHECKBOX
VALUENAME eBayChoice
ACTIONLISTON
KEYNAME "Software\Policies\Microsoft\Internet Explorer\SearchScopes\{39A4CFEC-5034-45C8-98B6-64AD1B5C0730}"
VALUENAME DisplayName VALUE "eBay"
VALUENAME FaviconURL VALUE "http://ie8.ebay.com/resources/images/favicon.ico"
VALUENAME PreviewURL VALUE "http://ie8.ebay.com/accelerator/search/?q={searchTerms}&s=3"
VALUENAME ShowSearchSuggestions VALUE NUMERIC 1
VALUENAME SuggestionsURL VALUE "http://ie8.ebay.com/suggest/visual/?q={searchTerms}&s=3"
VALUENAME SuggestionsURL_JSON VALUE "http://sug.ebay.com/?q={searchTerms}&c=3"
VALUENAME URL VALUE "http://rover.ebay.com/rover/1/710-61977-23097-0/4?satitle={searchTerms}"
END ACTIONLISTON
END PART
PART "Wikipedia (en)" CHECKBOX
VALUENAME WikipediaChoice
ACTIONLISTON
KEYNAME "Software\Policies\Microsoft\Internet Explorer\SearchScopes\{8EDF1540-AEBC-4EA2-808D-788F5C7531BE}"
VALUENAME DisplayName VALUE "Wikipedia (en)"
VALUENAME FaviconURL VALUE "http://en.wikipedia.org/favicon.ico"
VALUENAME ShowSearchSuggestions VALUE NUMERIC 1
VALUENAME SuggestionsURL VALUE "http://en.wikipedia.org/w/api.php?action=opensearch&format=xml&search={searchTerms}&namespace=0"
VALUENAME SuggestionsURL_JSON VALUE "http://en.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}&namespace=0"
VALUENAME URL VALUE "http://en.wikipedia.org/w/index.php?title=Special:Search&search={searchTerms}"
END ACTIONLISTON
END PART
END POLICY
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"
Search_Explain="Adds registry entries to HKCU\Software\Policies\Microsoft\Internet Explorer\SearchScopes for specific search providers. Check or clear the checkbox next to each search provider.\n\n If you enable this policy setting and if the "Restrict search providers to a specific list of providers" Group Policy setting is enabled, the checked entries will be the only ones that appear 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, the checked entries will be added to the user's list of search providers.\n\n If you disable this policy setting or do not configure it, search will be governed by the other relevant policies in this category. See the other policies mentioned here for additional information."
答案2
您可能会在以下 TechNet 链接中找到一些内容:
答案3
假设您使用的是 Vista 或 Win7 - 但如果您还没有,也有很多 reg 2 adm 转换器。但如果您正在使用,我建议您将搜索提供商设置为适合所有人,然后导出此处的注册表项:
HKCU\软件\Microsoft\Internet Explorer\SearchScopes
从导出的注册表中删除所有用户特定的项目(每个提供程序子项中可能有一个 FavIcon 或类似的项目)。
下载此脚本: 注册表到 ADML\ADMX 脚本
按照说明运行,即
cscript c:\..\reg_2_admx.vbs c:\..\Exported_HKCU_SearchScopes_RegKey.reg en-US "Microsoft IE 搜索范围策略"
将结果复制到 DC 上的相应文件夹(假设您使用的是合并的 ADM 模板)并启用策略。对我来说非常有效。