How to Change the Default Installation Path for FTP and the Web

If you’ve installed IIS 4.0, you’re accustomed to being asked where you would like the default website and sample files to be located.  Like you, many administrators are surprised to find that IIS 5.0/6.0 is installed by default to the %systemroot% folder without asking you where you would like for Inetpub to be located.
 
 
To change the default installation paths for FTP and the Web during an unattended component installation (this applies to Windows Server 2003), you must follow this procedure:

  1. Create an unattended install file and name it Iis.txt. This file will be accessed during the unattended component installation. The answer file can be any Windows 2000 answer file. It must contain a "Components" and an "InternetServer" section header. For example:
    [Components]
    iis_common = on
    iis_inetmgr = on
    iis_www = on
    iis_ftp = on
    iis_htmla = on
    
    [InternetServer]
    PathFTPRoot=D:\Inetpub\Ftproot
    PathWWWRoot=D:\Inetpub\Wwwroot
  2. Use the Sysocmgr.exe command to start the installation of the FTP or Internet Information Services components. Assuming the answer file that you created in step 1 was named Iis.txt, the command line to execute the installation would be:
    sysocmgr /i:%windir%\inf\sysoc.inf /u:c:\iis.txt

    Note that you could also use a batch file to execute the setup. The batch file must contain a command similar to the command above.

And other references: