How to install IIS unattended

/

How to install IIS unattended.

Unattended install is useful if you need to deploy multiple web servers and need to ensure that each of the web servers is setup with the identical with IIS.
Unattended installs can also be used during the install of Windows Server 2003.
In this article I’ll cover installing IIS unattended after the OS has been deployed.

By default IIS installs the following directories:
* %systemroot%InetPub
* %systemroot%HelpIISHelp
* %systemroot%System32InetSrv
* %systemroot%System32InetSrvMetaBack

These directories contain content and cannot be moved. You can, however, select the location of your wwwroot and ftproot directories at installation by using a script during unattended setup.

To start using unattended installs:
1. Create an answer file. Use notepad and type in the following:

[Components]
iis_common = on
iis_www = on
iis_inetmgr = on
iis_asp = on
aspnet = on
complusnetwork = on

[InternetServer]
PathFTPRoot = C:InetpubFtproot
PathWWWRoot = C:InetpubWwwroot

2. Save the file as IIS_Unattended.txt

3. Next we run the unattended install by running the following command from a command line:

Sysocmgr.exe /i:%windir%infsysoc.inf /u:%PathToUnattendFile%

Setup will now install IIS with the IIS Components chosen in the answer file above, in this example we’ll install:

Components section:
* IIS Common Files – (iis_common)
* WWW Service – (iis_www)
* IIS Manager – (iis_inetmgr)
* Active Server Pages (ASP) – (iis_asp)
* ASP.NET – (aspnet)
* COM+ – (complusnetwork)

InternetServer section:
* Desired path for www content, i.e. D:InetpubWwwroot – (PathWWWRoot)
* Desired path for ftp content, i.e. D:InetpubFtproot – (PathFTPRoot)

To get a full overview over the IIS Components which you can add to your answer file, read the MS TechNet article: Microsoft TechNet – Creating an Answer File (IIS 6.0)

Unattended install can be used for all Windows components, for more information on this read:
Windows Server 2003 Technical Reference – How Unattended Installation Works

Other references: Microsoft TechNet – Installing (IIS 6.0)