Issue: While installing the SharePoint 2013 on Windows 8 or Windows 2012 server prerequisite the installation operation fails, and then it rolls back and restarts in an infinite loop.
Resolution: Download the necessary servicing packet update for Windows 8 or Windows 2012 from http://support.microsoft.com/kb/2771431
Download the above update and then run the pre requisite, it should run successfully after the above update is installed.