Hi
I had the same problem, and fixed it. I manually removed com_comprofiler folder from /components and /administrator/components, turned off Joomla FTP management from Global Config->Server - retried the installation of com_comprofiler.zip and it worked.
I did a bit of research into using a php.ini file too and I think the correct syntax for 300 secs is
<?php
set_time_limit(300);
?>
Hope this helps someone out, fixed mine in 20mins by looking at this thread and trying stuff out.
Thanks guys!