Edit:
When I wrote this post I didn't know what the
SC_IISSITE_ID
parameter to the MSI was for. Since then I've discovered what it does. And it turns out that it and another parameter not discussed here are quite important if you want to install more than one instance of Sitecore on the same machine. If you want to make use of the automated approach below,
you should also read my more recent post about the parameters.
I got a question on twitter the other day about how you might go about using the automated install ideas I posted recently in a PowerShell script.
I'm not much of a PowerShell user, but here are a couple of suggestions: