Assuming you want to create a setup package (from WSP) checkout the Sharepoint Installer on codeplex:http://www.codeplex.com/sharepointinstaller