Friday, 05 January, 2001

Changing IIS Default Directories

I've set up Microsoft's Internet Information Services on my home and office workstations (Windows 2000 Professional), but today was the first time I'd set up the software on a production server.  The install process is the same, but because this is a production server, we wanted to make sure that all the data is stored on our Data share so that we can back it up more easily.  IIS (including the FTP and SMTP services) defaults to storing everything in subdirectories of c:\inetpub.  If you want to move things to another directory, there are about a dozen different paths that you have to change, and it's difficult to find them all.  When we finished, we deleted c:\inetpub.  After rebooting, something created the c:\inetpub directory, mailroot, and some files within mailroot.  I'd be willing to bet that the string "c:\inetpub" is hard-coded in one of the executables.

It shouldn't be that difficult to change the default locations.  Microsoft should know by now that people who are serious about backing up their data typically store their data separately from their executables.  I, for example, install all of my software on the C: drive, but all of my data goes on D:.  I hate software that makes it difficult for me to change default data locations.  The setup for IIS should have an option to specify the name and location of the inetpub directory, and then automatically move the wwwroot, mailroot, and ftproot directories.  The setup should also have a single dialog page where you can specify all of the paths.  In moving the IIS defaults from c:\inetpub to the d:\data share, I had to visit dozens of different dialog pages, and the only way to be sure that I got everything right was by trial and error.

IIS isn't the only program that suffers from this problem.  All of the Office programs want to store stuff in the "My Documents" directory, and Outlook wants to store its files in the "Application Data" directory.  It's not hard to move these directories once you find the option, but it's not easy finding all of the places to specify path names.  Just about every commercial program I can think of wants to store stuff either in "My Documents" or in a subdirectory of the install directory.  That's almost never where I want data to be stored.  Some are easier to change than others, but very few make it simple.  Maybe there's a registry setting that will let me change the location of "My Documents".