We use the installshield automation interface wrapped in a C# project...we call it out as part of a script to build. It is very possible to do this. Also, here is an example from Installshield on some ways of doing it.
http://www.flexerasoftware.com/webdocuments/PDF/autobuild.pdf