none
Moving Windows Update Download Folder

    Question

  • Does anyone know how to move the locations that Windows Automatic Updates downloads updates to?  I have a Dell server that was partition with an 8 gig C drive and it tends to fill up I'm looking to move anything I can to the larger D drive.
    Tuesday, August 25, 2009 2:38 PM

Answers

  • Hi,

     

    Thank you for the reply.

     

    I am afraid that we cannot change the location for downloaded updates. If we delete or move the SoftwareDistribution folder, a new SoftwareDistribution folder will be created automatically in C:\Windows and new updates will be downloaded into it.

     

    Based on the current situation, you may delete or move the SoftwareDistribution folder manually regularly. Or you can create a script to delete or move the SoftwareDistribution folder and create a task scheduler to run this script.

     

    Hope it helps.

     

    Tim Quan - MSFT

    Tuesday, September 01, 2009 7:08 AM
    Moderator
  • Hi,

     

    If you would like to delete the SoftwareDistribution folder, please try below:

     

    1. Stop the Automatic Updates service. To do this, follow these steps:

     

    a. Click "Start", click"Run", type "services.msc" (without the quotation marks), and then click "OK".

    b. Right-click the "Automatic Updates" service.

    c. Click "Stop". The service will take a moment to stop.

     

    2. Rename C:\WINDOWS\SoftwareDistribution to C:\WINDOWS\SoftwareDistribution_old, and backup the folder to an alternate location.

     

    3. Start the Automatic Updates service. To do this, follow these steps:

     

    a. Click "Start", click "Run", type "services.msc" (without the quotation marks), and then click "OK".

    b. Right-click the "Automatic Updates" service, and then click "Start".

     

    The service will take a moment to start and the fold will be recreated when you try to visit windows update site. You can then delete the SoftwareDistribution_old folder.

     

    Tim Quan - MSFT

     

    Wednesday, September 02, 2009 6:55 AM
    Moderator

All replies

  • JeffWask

    I tried looking for a place to change the default location, but came up empty on that.

    I would uninstall WSUS, but leave the downloaded files in place. Look for the c:\WSUS folder and move that to where you want it to be. Reinstall WSUS using the new location.

    reinstalling WSUS is not the long of a process. The "long" part is the first intial sync'ing. but since you already have those downloaded, that won't take long either.

    Let me know if this helps.

    Miller-IT
    Wednesday, August 26, 2009 6:54 PM
  • Hi,

     

    Are you running Windows Server 2003 or Windows Server 2008? If it is Windows Server 2008, update files will be saved in C:\Windows\SoftwareDistribution. Files downloaded in this folder will be removed automatically after a period of time.

     

     

    Tim Quan - MSFT

    Thursday, August 27, 2009 4:30 AM
    Moderator
  • Thanks to both of you...

    Miller-IT, I am running WSUS on my internal network however the server in question is a remotely hosted web server not attached to my domain.

    Tim, not very big is quite relative.  The two servers in question came shipped from Dell with 8GB C: partitions.  (this mistake occurred before my time.)  It seems that the SoftwareDistribution folder has is over 800MB in size or greater  than 10% of my drive.  When you have less than 100MB of free space 800MB is significant.  I have purge log files and all of the hidden patch uninstall folders which swallow a ton of drive space so I am, in much better shape now.  It would still be nice to move that folder, maybe a little registry hacking is in order...
    Thursday, August 27, 2009 1:55 PM
  • I just ran a clean up on my WSUS server (on 2003) and it cleaned up 20GB. Hate to see what your definition of "Not very big" is. LOL

    Miller-IT.
    Thursday, August 27, 2009 3:32 PM
  • Hi,

     

    As you are running WSUS, I suggest discussing it in our WSUS forum. They are the best resource to troubleshoot the issue.

     

    http://social.technet.microsoft.com/Forums/en-US/winserverwsus/threads

     

    Tim Quan - MSFT

     

    Friday, August 28, 2009 2:01 AM
    Moderator
  • I think you misunderstand...  I'm talking about straight Automatic Updates and the folder location that that service downloads updates to C:\Windows\SoftwareDistribution \downloads.  This issue does not involve WSUS.  As I stated, I run WSUS on my internal servers but these 2 externals servers are serviced by standard Windows/Microsoft Update and download directly from the internet.  They are not connected to my domain and therefore not connected to my WSUS server. 

    Since Windows Update does not clean up after itself well and you cannot cap it's downloads I was looking to move that folder to a partition with more than 8GB of total space because overtime that partition fills up.
    Monday, August 31, 2009 1:46 PM
  • Hi,

     

    Thank you for the reply.

     

    I am afraid that we cannot change the location for downloaded updates. If we delete or move the SoftwareDistribution folder, a new SoftwareDistribution folder will be created automatically in C:\Windows and new updates will be downloaded into it.

     

    Based on the current situation, you may delete or move the SoftwareDistribution folder manually regularly. Or you can create a script to delete or move the SoftwareDistribution folder and create a task scheduler to run this script.

     

    Hope it helps.

     

    Tim Quan - MSFT

    Tuesday, September 01, 2009 7:08 AM
    Moderator
  • Hi,

     

    If you would like to delete the SoftwareDistribution folder, please try below:

     

    1. Stop the Automatic Updates service. To do this, follow these steps:

     

    a. Click "Start", click"Run", type "services.msc" (without the quotation marks), and then click "OK".

    b. Right-click the "Automatic Updates" service.

    c. Click "Stop". The service will take a moment to stop.

     

    2. Rename C:\WINDOWS\SoftwareDistribution to C:\WINDOWS\SoftwareDistribution_old, and backup the folder to an alternate location.

     

    3. Start the Automatic Updates service. To do this, follow these steps:

     

    a. Click "Start", click "Run", type "services.msc" (without the quotation marks), and then click "OK".

    b. Right-click the "Automatic Updates" service, and then click "Start".

     

    The service will take a moment to start and the fold will be recreated when you try to visit windows update site. You can then delete the SoftwareDistribution_old folder.

     

    Tim Quan - MSFT

     

    Wednesday, September 02, 2009 6:55 AM
    Moderator
  • I'm using Windows 7 Home Premium 64bit and have two drives a 65GB Solid State and a 500GB SATA - Its a notebook. I was running out of space so I modifed your procedure to move the SoftwareDistribution Folder to my 500GB. Here are my steps and it seemed to work.

    1. Stop the Automatic Updates service. To do this, follow these steps:

     

          a. Click "Start", click"Run", type "services.msc" (without the quotation marks), and then click "OK".

          b. Right-click the "Automatic Updates" service.

          c. Click "Stop". The service will take a moment to stop.

     

    2. Make a Folder on non-C Drive called \WINDOWS\SoftwareDistributionRelocated  in my example it was E: drive/

    3. Move all files and folder in C:\WINDOWS\SoftwareDistribution to E:\WINDOWS\SoftwareDistributionRelocated

    4. Delete the C:\WINDOWS\SoftwareDistribution FOLDER
     

    4. Make a link between C:\WINDOWS\SoftwareDistribution AND E:\WINDOWS\SoftwareDistributionRelocated
             a. Right Click on Start\All Programs\Accessories\Command Prompt and Run as administrator
             b. MkLink /D C:\WINDOWS\SoftwareDistribution  E:\WINDOWS\SoftwareDistributionRelocated

    5. Start the Automatic Updates service. To do this, follow these steps:

           a. Click "Start", click "Run", type "services.msc" (without the quotation marks), and then click "OK".

           b. Right-click the "Automatic Updates" service, and then click "Start".

    Again, this seemed to work. I am concerned about the permissions on the folder as they are inherrited from the root of the drive, not from the Windows Folder on C:
    .

    Thursday, February 11, 2010 1:24 AM
  • I know this thread is "obsolate", but still someone can search it for help. I think there should be a way. If you stop update service and then move soft.distrib. folder to D:, you can create symbolic link / junction to this folder in its original location. This should work ok.
    Thursday, August 26, 2010 9:46 AM
  • Tim and Jeff,

    Please see this post on how to redirect the software distribution folder to another drive using a symbolic link and the Microsoft Junction tool.

    http://msmvps.com/blogs/jeffloucks/archive/2010/09/19/redirecting-updates-and-the-software-distribution-folder-using-junction-to-another-hard-drive.aspx

    • Proposed as answer by Jeff Loucks Sunday, September 19, 2010 9:10 AM
    Sunday, September 19, 2010 9:10 AM
  • Tim and Jeff,

    Please see this post on how to redirect the software distribution folder to another drive using a symbolic link and the Microsoft Junction tool.

    http://msmvps.com/blogs/jeffloucks/archive/2010/09/19/redirecting-updates-and-the-software-distribution-folder-using-junction-to-another-hard-drive.aspx

    That does not or no longer works. Because as mentioned above, deleting the SoftwareDistribution folder from C:\WINDOWS and restarting the updates service just results in the SoftwareDistribution folder being recreated by Windows. The redirection of update data does not occur.
    Thursday, January 03, 2013 7:01 AM
  • In windows 7, the service name is "Windows Update"
    Sunday, November 22, 2015 4:26 PM
  • I created a batch script to do this.

    1. You have to stop Windows Service
    2. You may have to stop BITS (optional if just stopping Windows Service does not work)
    3. Deletes the "SoftwareDistribution" folder and all contents within
    4. Creates a "SoftwareDistribution" folder on the D: Drive
    5. Makes a soft Junction on C:\Windows\ from "SoftwareDistribution" to D:\SoftwareDistribution
    6. Starts up Windows Service and BITS
    net stop wuauserv
    net stop bits
    if exist C:\Windows\SoftwareDistribution rmdir /S /Q C:\Windows\SoftwareDistribution
    rmdir /S /Q D:\SoftwareDistribution
    if not exist D:\SoftwareDistribution mkdir D:\SoftwareDistribution
    CD /D C:\Windows
    mklink /J SoftwareDistribution D:\SoftwareDistribution
    net start wuauserv
    net start bits

    • Proposed as answer by Buterman Wednesday, December 20, 2017 1:03 PM
    Wednesday, September 20, 2017 4:58 PM
  • The script worked for me.  I have one of those 32gb Windows tablets.  Windows updates was filling up the drive everytime it pull down updates. I push updates to my sdcard.  And 7gb freed up on my main drive.
    Wednesday, December 20, 2017 1:02 PM
  • Hi,

    Did it work for you? I have a similar problem, and tried to move SoftwareDistribution to a SD Card. The folder was moved (with the help of the script above) but after that Windows Update stopped working with error code 0x80070005, so no luck for me. But your Windows Update is still working?

    Monday, December 25, 2017 9:04 PM
  • do you have to run this everytime it fills up or just once?
    Thursday, February 22, 2018 6:57 PM
  • that error code is due to lack of permissions, I wonder if there is a way to grant the new location the same permissions as the old one. 
    Thursday, February 22, 2018 7:05 PM
  • Hey, you sure can! I have been fighting with this on a 16GB Tablet for a little bit.

    The main problem is permissions in this case, especially when trying to junction onto an SD card.

    Firstly, the SD card should be formatted I have found with NTFS (or another filesystem that supports Windows security permissions, whatever those may be).

    After stopping the Windows Update service and copying the SoftwareDistribution folder to the SD card (and renaming it in C:\Windows to SoftwareDistribution.old in case of trouble) I found the permissions were still simply my user as the owner and EVERYONE as the only permissions, even though it was an NTFS to NTFS copy. I think the system assumes this behavior when it knows the destination is removable media. I opened the Security Permissions window for a SoftwareDistibutions folder on an unmodified install and copied every permission exactly. ALL RESTRICTED SOFTWARE PACKAGES you will be unable to set. After, change the owner to SYSTEM. Be sure you select the change permissions for all subfolders/files thing.

    Once done I restarted the Windows Update service and checked for updates in the settings app, and my 0x80070005 error was gone!

    Even though I can change it with path I also junctioned my Windows/Temp to the SD card, as well as my Users/USER/AppData folder. No problems so far.
    Junctioning the entire Users/USER folder results in getting a temp profile when you log in. (I think it dislikes NTUSER.dat being somewhere else. And of course you can change most of the user data folders like Pictures and Documents by right clicking and just setting a new folder in properties.

    I also tried and failed to move my WindowsApps folder from Program Files. This results in a fun BSOD: Kernel Trap Error. It sucked but I laughed at "Kernel Trap". You can set a new folder for any new apps you install in the store from Settings anyways, I was trying to move the bulk of preexisting apps.


    This all of course means I can never remove this SD card from the slot, but it beats an a full and fully unusable 16GB tablet!


    Next up I am going to try to move the ProgramData folder but I doubt it will work.
    • Edited by ph2ox Wednesday, February 28, 2018 10:07 AM
    Wednesday, February 28, 2018 10:02 AM
  • Oh and I have totally been using mklink /J for all of these, but did /D when finding this thread for SoftwareDistibution. I think /J would still have worked, but I only had all this properly NTFS stuff while knowing to stop Windows Updates services after finding this here. /J is working for all the other links!

     Another thing I did differently this time is mounting the SD card as a folder: C:\SDCARD instead of its own D: drive letter. Unsure if this had an impact.
    • Edited by ph2ox Wednesday, February 28, 2018 10:29 AM
    Wednesday, February 28, 2018 10:22 AM
  • Just wanted you to know you're a genius.  It's a very simple solution that just worked for me. I have a 4 year old Toshiba tablet that I've been nursing along. Most every time there is a new version, I wipe it and reinstall with a USB.

    Well, I was looking around and found your script. The first time I tried it with a SD card with FAT32. Nope. Got the error. Then I remembered I had an old 500GB drive and a USB docking station. I was going to use it on my Xbox One but never got around to it.

    Using an external USB splitter cable, a USB hub, I connected everything and rebooted. Ran you script and rebooted again. It took a few failures to finally get enough space, but it just installed the latest public release of Windows (before Spring 2018).  Works like a champ and I have 1 1/2 GB to play with since it's installing everything on the external.

    Now, just for fun, I signed up for the Insider program on the Tablet. I was already on it for my old system and phone.  It now came up and asked me if I want to use the external drive as storage for the upgrade.

    So I guess I won't have to use the script again, but thanks. It got the job done.

    Monday, April 16, 2018 12:37 AM