While trying to install SharePoint Foundation 2010 on my windows Server Standard 2008 R2, I keep getting error that “System is unable to proceed due to following error(s). A system restart from a previous installation is pending. Restart your computer and run setup to continue”. After seeing this error for the first time, I promptly rebooted my machine. But after couple of tries, I realized that the message was little misleading. I started checking for windows updates to make sure that I had all the updates installed. But that was not the problem. The real problem was that during the visual studio 2010 RC installation, there were bunch of registry entries that never got cleared which confusingly, makes installer to believe that a reboot is required.
Well, in order to resolve this problem, all you do is delete the following registry key.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations
OR
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Session Manager\PendingFileRenameOperations
Thats it, this will get the windows installer working as expected and you will be able to go to the next screen (see below).