Saving space on an SSD hard drive using Sysinternal’s Junction
Not so long ago I decided to buy myself a new computer (since my old one could handle the pressure), I bought myself two hard drives:
OCZ Vertex2 60GB
Western Digital Caviar Blue (1TB)
The SSD for the operating system and the Caviar Blue for all my data.
I installed my Windows 7 Ultimate edition (with no SP1), Visual Studio, Office and updated them all using Windows Update.
After doing so, I was amazed to find out that I had only 20GB left on my SSD drive – bummer…
In order to find out what is taking me so much space I used WinDirStat (http://windirstat.info) and find out that my C:\WINDOWS\Installer folder took almost 6GB of my expensive SSD space!
After searching the web for a while I found out about Mark Russinovich’s tool called "Junction"
From his site (http://technet.microsoft.com/en-us/sysinternals/bb896768):
Windows 2000 and higher supports directory symbolic links, where a directory serves as a symbolic link to another directory on the computer. For example, if the directory D:\SYMLINK specified C:\WINNT\SYSTEM32 as its target, then an application accessing D:\SYMLINK\DRIVERS would in reality be accessing C:\WINNT\SYSTEM32\DRIVERS. Directory symbolic links are known as NTFS junctions in Windows. Unfortunately, Windows comes with no tools for creating junctions—you have to purchase the Win2K Resource Kit, which comes with the linkd program for creating junctions. I therefore decided to write my own junction-creating tool: Junction.Junction not only allows you to create NTFS junctions, it allows you to see if files or directories are actually reparse points. Reparse points are the mechanism on which NTFS junctions are based, and they are used by Windows’ Remote Storage Service (RSS), as well as volume mount points.
So I have downloaded Junction, created a folder (with the correct credentials of course) on my other hard drive and pointed C:\WINDOWS\Installer to the new folder... success! Everything is working as expected (Windows Update) and I just cleared 6GB from my SSD hard drive…
You can download Junction from here: http://technet.microsoft.com/en-us/sysinternals/bb896768
(Using instructions can be found under the download page)