If you are upgrading from a previous version of Gallery, please see the Upgrading Guide.
IIS is not officially supported by the Gallery Team. These instructions are provided as a guide to help you with setting up Gallery on IIS, but because of major problems with PHP and IIS integration, IIS is not considered a supported platform.
These instructions are a slightly modified and expanded version of the steps previously found in the Wiki web, gathered from various forum users' experiences.
Install PHP by running the installer program found at the PHP downloads page
Find the php.ini file (should be in your system root directory, e.g. C:\winnt\ or C:\windows. Open it in Notepad. Locate the line that starts with error_reporting . Change the line to read: error_reporting = 2039 . Then change the line that starts with session.bug_compat_warn to session.bug_compat_warn = 0. Next, find the line that starts with magic_quotes_gpc and change it to read magic_quotes_gpc = 0. Finally, find the line that starts with session.save_path and make sure it points to a valid directory, such as C:\winnt\temp or C:\windows\temp. Also find the line that starts with upload_tmp_dir. Set this directive to the same thing as session.save_path. Remember what you specified for these directives for a later step.
Open the IIS panel (Start -> Control Panel -> Administrative Tools -> Internet Information Services). Right click on the "Default Website" (or the name of the website you're installing Gallery under) and choose "Properties". Click the "Documents" tab, and click "Add". Enter "index.php" and click OK. Click OK and close the IIS panel.
Make sure the IUSR_[machinename] account has full read/write access to your PHP session data and upload temp directories (see step 2). Find the directory you specified in Windows Explorer and right click on it, choosing "Properties" then "Security". If you see the IUSR_[machinename] account listed, make sure it has full read/write permissions. If not, you will have to add this account. Click "Add..." then "Advanced" then "Find Now". It will show a list of all the user accounts available on the machine. Find the IUSR_[machinename] account and click "OK" and "OK" again. Then make sure the account has the proper permissions, as listed above.
Download ImageMagick and run the installation program. Do NOT install it to the default directory. Instead, choose something like C:\ImageMagick or another directory without a space. Remember this directory.
If you are using jhead or other optional programs, install them in a directory without a space. Remember which directory you installed them in.
Download Gallery and unpack it under your wwwroot directory.
Create two directories called albums and tmp in the newly created directory where you unpacked Gallery. Give the IUSR_[machinename] user full read/write access to these two directories.
Put Gallery into config mode by running configure.bat in the root Gallery directory
Run the configuration wizard . Input all necessary information, including where you put all the programs you installed earlier and where you created your albums and temp directories (see previous step).
Complete the config wizard and run secure.bat.
Search for cmd.exe on your system. It should be in the C:\windows\system32 or C:\winnt\system32 folder. Make sure the IUSR_[machinename] account has read and execute permissions to it. Another possible solution may be to copy cmd.exe for your c:\windows\system32\ folder to the same folder php.exe resides in. The problem might not just be permissions, but the ability to run cmd.exe from it's default location via IIS.
Your Gallery should be successfully installed. Enjoy!
If you are using NetPBM, instead of ImageMagick (not recommended), you may need to refer to FAQ C.26.