Of course you can do that, and it's in fact a good thing to do because most attacks rely on IIS to be installed in it's default location (C:\Inetpub\) simply by moving IIS to drive D: you have eliminated a great deal of exposure.
Even thou this is possble, the technique used requires that Windows be installed with an unattended script, however, I sucessfully done just what you asking in IIS 5 after Windows and IIS were installed.
Microsoft answered this question in question: (Q274140), but the article is no longer found in the web site, I keept a copy of it on my server (lucky me) which you can access here:
this is the original tech article that explained the process of moving IIS default drive/folder, it provides a script that you have to: copy > create > change > run this script can also change dirs for SMTP/FTP and other services, disable the services you don't have or need to change.
All the best, keep me informed.
------------------------------
------------------------------