When your have installed PHP with the Microsoft web platform installer PHP is installed in C:\Program Files (x86)\PHP\v5.2.
When your PHP script runs longer than 10 minutes (600 seconds) you will get an 500 Internal server error.
To fix this issue you will need to increase the fastCgi activityTimeout in IIS7.
After Googling around i found a solutions, but because the web platform installer installs PHP in a path with spaces in it all examples failed.
I Googled some more and after a while i combined 2 solutions and got it to work.

Start a command promt and go to this folder:c:\Windows\System32\inetsrv

Hello, if you doesn’t define parameters before you have an “not found error”.
You can do this throw IIS Admin aplicatión.

Click on server>FastCGI config, then select the line to config, usually where shows php-cgi.exe and then click on modify on right panel. This shows all the accesible parameters, like “activity time”, “idle Time” and so on.