I have seen another error which cropped up during my install/uninstalls and occurred after I installed and created site collections using the Configuration Wizard to create the web sites.
When I uninstalled MOSS it appears that the uninstall procedure also (*very helpfully!*) removed my hosts file from my server 2003 IIS 6 box. When I attempted to re-install MOSS the installation phase failed because the install was unable to locate my hosts file. I missed it at first and attempted to re-install to the same effect.
I created a new hosts file and it installed just fine next time around (natch!)
Moral :: Even if you think you've seen the error screen before - read it again anyways!
I have been installing/uninstalling and creating/deleting web applications galore the last few days and eventually the MOSS installation blew up on me.
Re-installing MOSS after an uninstall the installer failed with error : The directory name was invalid. Further inspection of the install log revealed that the error occurred attempting to perform an iisreset.
I uninstalled IIS and reinstalled it - reinstalled Asp.Net 2.0 (aspnet_regiis /i) and then removed/reinstalled WWF before re-running the MOSS installer - Bob's your uncle and Robert's your mother's brother - the installer succeeded.
Hopefully you won't see the error but if you do - this is what fixed it for me!
Bill English has put together a sweet quick step-by-step to getting your first Corporate Intranet Site portal up and running under MOSS 2007.
Follow the link above to check it out.