re-directing C:\windows\SoftwareDistribution to an SDcard (1 sucess, 1 failure)

VirtualLarry

No Lifer
Aug 25, 2001
56,226
9,990
126
I'm trying to do this, but it's not working, it keeps throwing the below error.


1573273857498.png

The Read-only attribute re-appears after I clear it.
 

VirtualLarry

No Lifer
Aug 25, 2001
56,226
9,990
126


Code:
net stop wuauserv
net stop UsoSvc
net stop BITS
net stop DoSvc
robocopy C:\Windows\SoftwareDistribution C:\SDcard\SoftwareDistribution\ /copyall /e
rmdir /S /Q C:\Windows\SoftwareDistribution
mklink /J C:\Windows\SoftwareDistribution C:\SDcard\SoftwareDistribution
net start wuauserv
net start UsoSvc
net start BITS
net start DoSvc

This solved it.

Edit: The above script, assumes that you've created a directory, \SDcard, and then formatted NTFS and mounted your SD card into this directory first, using Disk Management.
 
Last edited:
  • Like
Reactions: mxnerd

mxnerd

Diamond Member
Jul 6, 2007
6,799
1,100
126


Code:
net stop wuauserv
net stop UsoSvc
net stop BITS
net stop DoSvc
robocopy C:\Windows\SoftwareDistribution C:\SDcard\SoftwareDistribution\ /copyall /e
rmdir /S /Q C:\Windows\SoftwareDistribution
mklink /J C:\Windows\SoftwareDistribution C:\SDcard\SoftwareDistribution
net start wuauserv
net start UsoSvc
net start BITS
net start DoSvc

This solved it.
Link?
==
OK. saw it now.
 

VirtualLarry

No Lifer
Aug 25, 2001
56,226
9,990
126
I thought that this was "Solved", because on the freshly-installed Dell 11.6" laptop I finally got it working on, Windows Update said "Up to date".

I just tried the same script on a Lenovo IdeaPad 100S, with possibly an older release of Windows 10 (Edit: No, it was 1903 Home 32-bit), that had pending updates "in the queue", and the script seemed to complete successfully, but when I went to update, it said that the four items that it was updating, all "Failed to download".

I tried deleting the \SDcard\SoftwareDistribution\Download directory, or clearing the contents, and trying again, and again, "Download error".

So I blew away the \SDcard\SoftwareDistribution folder entirely, deleted the \Windows\SoftwareDistribution link, let Windows Update re-create the \Windows\SoftwareDistribution folder, and am now updating the system (on the eMMC).

After that's done, I'm going to try it again.

Edit: I wonder if this has something to do with the SD card being listed as "Removable" in Disk Management. I did delete the exFat partition and re-format as NTFS, mounted in the \SDcard directory.

Edit: I tried deleting \SDcard\SoftwareDistribution entirely, as well as \Windows\SoftwareDistribution , after stopping the four services listed in the script, and then re-starting the services, rebooting, doing Windows Update (which should have re-created it), then running the script, which stops the four services, and then robocopies the \Windows\SoftwareDistribution directory to \SDcard\SoftwareDistribution (*including permissions, which is why it uses RoboCopy), and then blows away the \Windows\SoftwareDistribution directly, and replaces it with a "Junction" to \SDcard\SoftwareDistribution.

Interestingly, though, for some reason, on the laptop that this worked on, the "Junction" shows a blue arrow towards the top of the folder, and the "Junction" created with the same script, on the IdeaPad 100S running 1903 Home 32-bit, shows a "Link" on the lower-left corner of the icon, like a shortcut. (Edit: No, I'm incorrect, both systems had the "link" overlay icon on the bottom-left of the folder icon.)

Not sure why the appearance is different.

Also, I did mess with and download the now-obsolete (? now the mklink supports the '/J' option for Junction) junction.exe from sysinternals (2010), and used that on the Dell that this worked on, but I since deleted the "Junction", and used the above script to re-create it. I just wonder if using the "junction" tool, made some sort of less-than-visible change to the NTFS filesystem, or created a registry entry, and that's why the script worked on the Dell (1903 Home 64-bit), and not the IdeaPad 100S (1903 Home 32-bit).
 
Last edited:

juancarlosleon

Junior Member
Dec 10, 2019
1
0
6
I thought that this was "Solved", because on the freshly-installed Dell 11.6" laptop I finally got it working on, Windows Update said "Up to date".

I just tried the same script on a Lenovo IdeaPad 100S, with possibly an older release of Windows 10 (Edit: No, it was 1903 Home 32-bit), that had pending updates "in the queue", and the script seemed to complete successfully, but when I went to update, it said that the four items that it was updating, all "Failed to download".

I tried deleting the \SDcard\SoftwareDistribution\Download directory, or clearing the contents, and trying again, and again, "Download error".

So I blew away the \SDcard\SoftwareDistribution folder entirely, deleted the \Windows\SoftwareDistribution link, let Windows Update re-create the \Windows\SoftwareDistribution folder, and am now updating the system (on the eMMC).

After that's done, I'm going to try it again.

Edit: I wonder if this has something to do with the SD card being listed as "Removable" in Disk Management. I did delete the exFat partition and re-format as NTFS, mounted in the \SDcard directory.

Edit: I tried deleting \SDcard\SoftwareDistribution entirely, as well as \Windows\SoftwareDistribution , after stopping the four services listed in the script, and then re-starting the services, rebooting, doing Windows Update (which should have re-created it), then running the script, which stops the four services, and then robocopies the \Windows\SoftwareDistribution directory to \SDcard\SoftwareDistribution (*including permissions, which is why it uses RoboCopy), and then blows away the \Windows\SoftwareDistribution directly, and replaces it with a "Junction" to \SDcard\SoftwareDistribution.

Interestingly, though, for some reason, on the laptop that this worked on, the "Junction" shows a blue arrow towards the top of the folder, and the "Junction" created with the same script, on the IdeaPad 100S running 1903 Home 32-bit, shows a "Link" on the lower-left corner of the icon, like a shortcut. (Edit: No, I'm incorrect, both systems had the "link" overlay icon on the bottom-left of the folder icon.)

Not sure why the appearance is different.

Also, I did mess with and download the now-obsolete (? now the mklink supports the '/J' option for Junction) junction.exe from sysinternals (2010), and used that on the Dell that this worked on, but I since deleted the "Junction", and used the above script to re-create it. I just wonder if using the "junction" tool, made some sort of less-than-visible change to the NTFS filesystem, or created a registry entry, and that's why the script worked on the Dell (1903 Home 64-bit), and not the IdeaPad 100S (1903 Home 32-bit).

Hi there!, were you able to finally resolve SoftwareDistribution folder redirection? I'm in the same boat and have also tried pointing the junction to an SD card either mounted as a D: drive or on a C:\SDCard directory, both ended up not working causing Windows Update to give the 0x80070005 error.