Jon Bradley and Nagesh Mahadev went deep in the setup process of exchange, and they have explained how the Exchange Server 2007 setup know to resume a previous failure.
In case that you have a failed Exchange 2007 setup for some reason, you might notice that setup now resumes the previously failed setup rather than start completely over. How does that work? Through registry values called "watermarks".
Watermarks are used to mark points of installation. Setup sets the mark of what server roles are installed halfway through setup as opposed to at the end. This is important because Exchange 2007 setup can be resumed. If there is a setup failure, the setup environment can be changed and then setup can be restarted from the watermark indicator as opposed to starting setup from the beginning.
Read more at source: http://msexchangeteam.com/archive/2007/05/21/439529.aspx