[This doesn't provide what you've asked for but is a different way to achieve the same result.]
First, about the warning... You can make sure you never see it again (on a per profile basis) as shown below:
Now, as regards the preferences you desire. In general, you can create a simple text file called
user.js. This file has to be placed in the relevant profile folder such as
random is something unique to each user).
The structure and syntax of
user.js is described in User.js file for example.
So in your case, you would have a line such as:
or, to use your other example (but see further down):
However, I suggest that you first ensure that the preferences you set are valid for the browser version you're using. I say this because I don't see
browser.search.defaulturl at all in my
about:config. I'm using Firefox 22 beta. Instead, I see:
So, taking the example of using Bing instead of Google, the other line in your
user.js if you're using Firefox 22, would be:
As the image indicates, you can search for additional engines.
So, in short, you can put your preferences in
user.js and you can remove the nag screen by unticking in the first image.
Also, as indicated in the resource I linked to, you must restart the browser for the code in
user.js to take effect.