I have created a program that mass creates frontpage subwebs and sets the permissions. I have the creating of frontpage subwebs working really well exept the only way I knew how to set the permissions is to use an Internet Explorer control and sends commands like document.form.button.click ect. to navigate though the permissions website to set user permissions which takes a long time when you are trying to process 1000 subwebs and is prone to errors. Is there a better, easier way to set the unique permissions that isn't prone to errors.

Sharepoint web permissions