DCom server installation

Can anyone tell me what the best way is to install a Dcom server?  I want to
build the installation into a program so that it handles the whole
installation on the network the server computer and all the client
computers.  The Dcom server runs on the the server computer when called on
by any of the clients.  This is fine, it works and I know how to do the
installation manually, using dcomcnfg.exe, but how do I do it
programatically?