While installing Microsoft Exchange 2010 SP1, the setup might fail with the following error
Setup previously failed while performing the action “Uninstall”. You can’t resume setup by performing the action “BuildToBuildUpgrade”.
The error will look like the below depending if you are using the GUI or CLI
To solve this problem you will need to edit the registry using regedit tool
Disclaimer: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. ZeroHourSleep cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.
On the Exchange server you are having trouble open open regedit and browse to HKLocalMachine\Software\Microsoft\ExchangeServer\V14 and check the roles Keys, MailboxRole in my case, and delete the Action and Watermark keys.
You should be fine to roll now