This is something that I put together a while ago but I'm only just now getting to the point where I can document it. I was looking for a solution to a common problem of propagating changes to content types deployed via a Feature and I came across a post by Søren Nielsen. Søren created a custom stsadm command which handles pushing down the content type changes. I didn't want to re-invent the wheel but I needed the ability to call the code in different ways and I wanted to try my hand at using the SPContentTypeUsages class so I decided to use what he created and just refactor it to meet my goals. Søren does a great job at explaining the problem and what the code is doing so I won't reiterate it here. My modified version of the code can be seen below:
By refactoring the code slightly I'm now able to use the code via the stsadm command, which I called gl-propagatecontenttype, or I can call the Process method via my Feature Receiver by just adding a reference to the assembly - this way I can push changes to content types down to the lists they are bound to when my Feature is re-activated. Here's the syntax of the command:
C:\>stsadm -help gl-propagatecontenttype stsadm -o gl-propagatecontenttype Propagates a site scoped content type to list scoped instances of that content type. Parameters: -url <site collection url> -contenttype <content type name> [-verbose] [-updatefields] [-removefields]
I suggest you avoid the use of the -removefields parameter if possible - I left it there because I thought I might need it but it's usually not a good thing to do something so destructive in batch like that (just make sure you at least test the change before going to production with it).
Again - props to Søren - I just retooled his code some.