cgi.force_redirect = 0
This is the minimum setting you need to change to make PHP work with IIS. You may also want to use
cgi.fix_pathinfo = 1,
fastcgi.impersonate = 1, and set
Then it's time to install IIS. You need at least the "Business" version of Windows 7, but the currently available beta 1 is Windows 7 Ultimate anyway. Go to Start/Control Panel/Programs/Turn Windows Features on or off and check on the Internet Information Services entry. Activate the World Wide Web Services/Application Development Features/CGI node and also Web Management Tools/IIS Management Console (the latter not shown in the figure).
Now, start the IIS Management Console; just open up the start menu, enter
inetmgrand hit Enter. There, navigate to the Sites/Default Web Site/Handler Mappings node and double-click on the "Handler Mappings" entry.
As a result of this, the Actions panel on the right hand side changes. You now see an option called Add Module Mapping. Clicking on it opens up a dialog which you fill out as you can see in the following figure (you may need to adapt the path used to your local system).
If you do not see the FastCgiModule entry, you probably forgot to check the CGI node when installing IIS. Otherwise, close the Add Module Mapping dialog by clicking on OK. You need to confirm that you want to create a FastCGI application; click Yes.
Finally, create a .php script and put it in the root folder of the IIS site (by default C:\Inetpub\wwwroot; note that you may need additional rights to write into that directory), e.g. phpinfo.php with a simple
phpinfo()call in it. Call this script using
http://localhost/phpinfo.php, and you are done!