|Duncan and Trixie cuddling|
Well, we have a server was constantly running out of space on its tiny 50 gig system partition and we were months away from retirement (best case), we've deleted all unneeded junk and there was no possibility of adding space.
I pulled out my favorite tool, SpaceSniffer, which shows disk usage. Six gigabytes were taken up in the c:\windows\Installer folder.
We had adequate space on the data partition, so the plan was to move the installer folder to the D drive. Since many software packages need the information in this folder in order to work, we needed to fool them into thinking the folder was still on C.
My Coworker, Mike, remembered an article he saw on Microsoft. The solution was to create a symbolic link to the folder. The kicker is that this has to be done at system level, which is higher than just administrator. After some Googling, here are the steps to do what we did.
- Copy the c:\Windows\Installer folder to the D Drive
- Delete the c:\Windows\Installer folder
- Download the Sysinternals PSTools from https://technet.microsoft.com/en-us/sysinternals/pstools.aspx
- Unzip these tools to a folder on the server.
- Run CMD as administrator on the server
- change into the PSTools folder, and execute PsExec by typing
PSEXEC -i -s -d CMD
- in the new Command Window that opens, test that you're running as system by typing
You should see "nt authority\system s-1-5-18"
- in the new command window, type
mklink /d c:\Windows\Installer d:\Installer
this will create the link, so software that navigates to C:\Windows\Installer will go, instead, to d:\Installer.
Viola, the server now had 6 gig free on C: and was now happy!