• I don't mean to sound like I am getting short with you but I am going to ask this again:

    Have you run the attached script?

    When you use these objects there is a setting called ScriptType that I took the time to setup which does not generate the "heading comment" In order to actually include it you would have to modify what is in there by 'OR 131072'

    If the attached script doesn't do what you want, let me know and I will help you modify it. However, if you are starting from scratch, then read the documentation on SQLDMO and the Transfer and Transfer2 objects and you will have everything you need. More specifically look at ScriptType and ScriptType2 attributes and you will be able to tweak whatever you like.