Moving Windows folders around with Junction links (mklink)

OK, I've taken the risk and it was worth it - everything works normally, but I have freed the 17GB on my SSD now.

Basically, the steps are:

  1. Restart your PC, press F8 continuously to bring up boot menu, and choose "Command prompt with safe mode" (this is to ensure you can move the windows folder around)
  2. Once the command prompt is shown, type the command to move the folder to another drive:
    robocopy C:\Windows\Installer D:\Windows\Installer /MOVE /e
  3. Next, create a "Junction" link for the missing folder:
    mklink /J C:\Windows\Installer D:\Windows\Installer

Of course, this assumes that your %WINDIR% is C:\Windows, that your D drive is the one with more space, that you want your destination in "D:\Windows\Installer" (it could be any folder, just be consistent) etc...

This should do the trick.


While attempting to reclaim space on my main drive, an 120GB SSD, I found these instructions on how to relocate Users, Program Files, Program Files (x86), and ProgramData. It includes some registry edits "to set default locations", as follows:

  1. Replace drive letters of paths listed at HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion (for example C:\Program Files\Common Files would become D:\Program Files\Common Files)
  2. Replace environment variables %SystemDrive% with drive path at HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion/ProfileList (i.e. %SystemDrive%\ProgramData would become D:\ProgramData)

I took similar steps, but I wanted to be able to use my computer while I did the file copy (my folder was 40 GB).

  1. Manually copy the folder to F:\Installer
  2. I am using Windows 8.1, so to get to a command line boot I held Shift while I clicked Restart, then clicked Advanced
  3. Once in the command line, I had to figure out which drive letter to use (it wasn't C: even though that is my %SystemDrive% when my OS is fully booted). I had to use echo list volume | diskpart to find out that the C: drive was now referred to as E: and the F: drive was still the F: drive
  4. I removed the hidden and system attributes on E:\Windows\Installer with attrib -s -h E:\Windows\Installer and renamed it with rename "E:\Windows\Installer" "Installer_old"
  5. I could then create the junction with mklink /J E:\Windows\Installer F:\Installer