By now, I’m sure many (if not all) of you are aware that the latest version of Firefox modified the default search provider to be Yahoo for all U.S. customers.
It’s simple enough to change on an individual basis for any particular user (instructions here). As system administrators for our various organizations, the issue that we often run into is making sweeping changes for many machines all at once.
Enter PDQ Deploy 4
For users of PDQ Deploy 4, this script is available as a package in our Package Library. The package is called, “Mozilla Firefox - Set Google as Search Engine.” We’re providing this as a package for all PDQ Deploy 4 users. This includes those that use the Free version of our software.
If you’re not familiar with PDQ Deploy, you should drop what you’re doing right now and go grab it.
Seriously, though, it’s a snap to setup and to deploy software silently to all the users in your organization.
Until this latest version, the preference option browser.search.selectedEngine is what was used to set the default search engine. There are many other preferences that can be configured and, indeed, are centrally configured in organizations that utilize Firefox. It is fairly straightforward to change different preferences. Here is a quick link to more information on the many configuration settings available in Firefox.
With the new version of Firefox, when you change your default search engine provider, the setting is no longer stored with the other configuration settings. The value is stored as a hashed value in a json file called search-metadata.json. It is created in the active Firefox profile for the current user. These settings may be changed in subsequent releases of Firefox.
Silently changing the default search engine
This is the PowerShell script that we use to modify the search provider of Firefox:
By utilizing the System.Security.Cryptography namespace in .NET, we calculate a SHA-256 hash from the combined values of the $Disclaimer, the firefox profile name and the name of the provider you wish to configure. We store the value of the result to the search-metadata.json in the current user’s firefox profile folder.
After running the script for any given machine, the change will be reflected when Firefox is restarted.
You can use any installed search provider as a value to update. By default in the US-version of Firefox, these values include:
- Wikipedia (en)
This script will update all user profiles on a given machine, so long as the firefox profile folder exists for a user. The profile gets created when a user runs Firefox for the first time.
It’s not a terribly long script, though it does certainly look fancy.
Try it out on a test machine and see if it works for you. You can decide if you want to use this in your organization. If you decide you would like to use this, we recommend the easy method of using this script.
The easy way
Install PDQ Deploy (4 or later) and grab our package and simply deploy it to all your users in your organization. If you have any questions along the way, we have a large variety of helpful videos - link.
The harder way
Take this script directly and manipulate it to run for all machines in your organization. This option is for the more advanced user who is familiar with scripting languages such as PowerShell.
It goes without saying that you should use this script at your own risk.