I did this type of thing many, many years ago, running scripts with a "DBA" app I wrote specifically designed for updating our database schemas and stored procs. In fact, the first one was written in VFP, later ported to .NET ... and I use SMO.
I didn't read the link that Naomi provided, but if you get stuck, let me know ...