HOWTO: Get VS2005 SP1 installed with minimum drive space

I've got my machine set up in a relatively common configuration: A C: partition for the OS, and a D: partition for everything else. I've got 6 gigs assigned to the OS partition, which up till now has been way more than enough, but not this time due to the ridiculous drive space needed to intall Visual Studio 2005 Service Pack 1. I've got quite a bit of stuff installed, and when I first started I had around 1.2 gigs free on the OS partition. (Even though I install all my software to the D: drive, it still seems lots of stuff ends up installed on the System drive anyway.)

I saw that the SP1 .msi was about 442 megs of space. I figured 1.2 gigs of free space would be more than enough. I was wrong. After the insanely slow installation process had ran for about an hour, I got a message saying that there was insufficient drive space. I boggled at this, then began researching how to get this installed.

Here's all the steps I ended up doing. (The real saving part was the registry hack I describe later, but still the other stuff helped too.)

First I did the basics, and hit Properties on the C: drive and clicked the Disk Cleanup button. That cleared up a lot of space. Tried the install again, same problem.

Next, I moved my My Documents folder to the D: drive. (Hit Properties on My Documents, then change the target to a directory on the D: drive.) Rebooted after this to make sure it took. Tried the install again. Still not enough space.

Next, I changed my environment settings for TEMP and TMP to a new Temp directory on the D: drive. (I did this both for my User Variables and for the System Variables.) (To do this, open Properties on My Computer, pick the Advanced Tab, then click the "Environment Variables" button, then change the settings for the TMP and TEMP variables.) This makes you reboot, so I did. (I had already moved my virtual memory file to the D drive long ago when setting up the machine.) Of course, I tried the installer again. STILL NOT ENOUGH SPACE!! This is getting insane.

Next, I go through Add/Remove Software, and removed everything I really didn't need (Java, J#, etc.), or could reinstall later, such as the MSDN Documentation Library. Still running out of space.

Now I've whittled the drive down to everthing I can think of. The next thing I try is to see if perhaps I can tell the MSI not to use the C: drive by invoking the MSI from the command line, followed by "/?". I couldn't find anything to keep it off the C drive, but I did find an option to extract the contents of the MSI. I did that with adding "/extract d:\download\VS2K5SP1" to the end of the command line. This gave me a file "VS80sp1-KB926601-X86-ENU.msp" in the specified directory. From this point on I used the .msp file to install the Service Pack, instead of the MSI. (Although there are optional command parameters for the .msp, I did not need to use any.) Still, at this point I still ran out of space. Having built up a pretty good feeling of frustrated disbelief about how difficult of a time I was having installing a 446 MB service pack, I then began searching around on the net for an answer.

The answer I found was to add a registry entry that disables the Patch Cache. I'd never even heard of such a thing before, but it's apparently where Windows puts copies of original files that are replaced when installing a patch. A good idea in most cases, but in this case it was just too much stuff. This was the thing that was hogging all the drive space. (I also warn you that if you do this, when you uninstall in the future, and possibly when you install future patches, you may need to have the original Visual Studio 2005 installation media, so don't misplace it!)

Add a DWORD value called MaxPatchCacheSize to the location HKLM\Software\Policies\Microsoft\Windows\Installer in the registry. The value in this case should be zero. (The default without this setting is to use 10% of the drive, you can tweak this value in the future if you want.)

After you add this setting, restart the msiserver service from the command line: net stop msiserver. (This will cause the MSI installer to obtain the MaxPatchCacheSize value.) You do not need to restart the service, it will autostart when you install from either an .msi or a .msi.

Now, go run the VS80sp1-KB926601-X86-ENU.msp file. If all goes well, in about an hour (or less, it seemed to take a lot less time with the Patch Cache turned off.) you will finally have a working installation of Visual Studio 2005 Service Pack 1!!!

Best to remove the MaxPatchCaseSize value from the registry at this point, but it's up to you what you do with it. (And once again stop the msiserver service.)

Hope this helps, enjoy!
Reply
This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available in our efforts to advance understanding of environmental, political, human rights, economic, democracy, scientific, and social justice issues, etc. We believe this constitutes a 'fair use' of any such copyrighted material as provided for in section 107 of the US Copyright Law. In accordance with Title 17 U.S.C. Section 107, the material on this site is distributed without profit to those who have expressed a prior interest in receiving the included information for research and educational purposes. For more information go to: http://www.law.cornell.edu/uscode/17/107.shtml . If you wish to use copyrighted material from this site for purposes of your own that go beyond 'fair use', you must obtain permission from the copyright owner.