Registration script

Has anyone developed a script that mimics the insertion of a registration record through SFAREGS? We would like to insert a registration record automatically instead of going through the SFAREGS form. There are other triggers and tables associated with the insert of a new registration record and I want to make sure that they are fired and updated respectively.
Basically, we would like to take the process of using the SFAREGS form and turn it into a script so we can load a generic course for our students.
Thanks,
Jeff