If you are trying install Exchange 2007 SP1 on a freshly installed Windows 2008 R2 and come up against the following error during the installation of the Mailbox Role:
An error occurred. The error code was 3221684229. The message was Access is denied..
Run setup.exe in compatibility mode. I chose Vista SP2 and then the installation went through normally.
But before you go rushing to finish your installation it is worth noting that Exchange 2007 SP2 will not be supported on Windows 2008 R2, and therefore you may want to reconsider doing the installation at all!