I was looking for some code to Enable Custom Scopes on a Site-Collection. I want to enable this from a feature instead of doing it manually for each site.
I couldn't find it fast on Google, so I tried to find out how `they' did it by using Reflector. It turned out it's easier than expected, just store the URL of the Search Center in a site-property and you're done:
[RootWeb].AllProperties["SRCH_ENH_FTR_URL"] = [URL to Search Center];[RootWeb].Update();
To disable the Custom Search Center:
[RootWeb].AllProperties["SRCH_ENH_FTR_URL"] = null;[RootWeb].Update();