<< Latest Post

Tuesday, September 20, 2005

Installing IIS on a Different Drive

When you install IIS from Add/Remove Windows components it gets installed in the OS drive(Usually C:\) by default.But some of us may not want it on the OS Drive, we might want to install it on a some other drive like data drive D:\. Easy way is to copy the entire Inetpub directory in Drive C to Drive D and change the Home Directory in IIS Default Web Site properties to D:\Inetpub\wwwroot.

I recently learned about another way is to perform unattended install in a article in FTP online and it did work well. Its like this,

1. Create some text file say iis.txt with the following contents,
[Components]
IIS_common = on
IIS_inetmgr = on
IIS_www = on
[InternetServer]
PathWWWRoot=d:\Inetpub\wwwroot

2. Run the following command,
sysocmgr /i:%windir%\inf\sysoc.inf /u::\iis.txt

3. Install will automatically start and will start installing IIS on Drive D.

This install requires admin rights and also will prompt for Windows CD or the location of the I386 directory.

sysocmgr.exe is System Optional Component Manager and it is used to add new components.