Monday, December 07, 2009

Moving the C:\WINDOWS\INSTALLER Directory

Often servers or workstations will run low of disk space on the system partition.  This is especially true I’ve found with older Dell servers that shipped with a 12GB system partition.

The c:\windows\installer directory often occupies several gigabytes of storage.

While Windows does not provide a mechanism to re-point this directory via the registry, you can use NTFS junctions/reparse points to re-point the directory to a different local volume.  Re-pointing to UNC paths is not supported.

  1. Obtain junction.exe from http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx

    I found it handy to add the executable to c:\windows\system32 for easy access

  2. Create the destination Installer folder on the new volume (ie: D:\Installer)

  3. Move all content from c:\windows\installer to your new directory

  4. Make sure to close any explorer windows with these folders opened.  Junction.exe requires that there are no open file handles to these directories

  5. Create the junction

    junction.exe c:\windows\installer d:\installer

8 comments:

Anonymous said...

This is really an elegant solution for a server that is running out of space on C: drive.

Anonymous said...

Instead of junction.exe, Windows built-in command 'mklink' can be used. See here: http://forums.crucial.com/t5/Solid-State-Drives-SSD/Random-space-saving-tip-Windows-installer-cache/td-p/51150.

Anonymous said...

I'm using XP and junction says it cannot create a link because the folder already exists. Why is that?

Anonymous said...

You have to delete/rename the c:\windows\installer folder

Anonymous said...

Thank you very much. I appreciate your help.

Anonymous said...

Hello,
Thanks for the article.
Actually, the command should be:
"junction.exe d:\installer c:\windows\installer" , no ?

Anonymous said...

First the command indeed should be junction.exe (junction.exe d:\installer c:\windows\installer)

And then what's missing here is that after you move the content of the to the new folder folder (c:\windows\installer). This is necessary because actually junction will create shortcut of d:\installer in c:\windows.

Good luck.

Anonymous said...

My previous post is missing some words which I put as tags, that's why here it is second time

First the command indeed should be junction.exe source target -> junction.exe d:\installer c:\windows\installer

And then what's missing here in the article is that after you move the content of the source folder c:\windows\installer to the target folder d:\installer , you need to delete the source folder. This is necessary because actually junction will create shortcut of d:\installer in c:\windows