I am thinking changing my windows update folder to the ramdisk to reduce the hard disk usage as much as possible.
I could change it to the external hard disk without problem regardless of the permissions, but when change it to the ramdisk it will not work.
Here is what I was doing.
At the beginning I had formatted to FAT32 which doesn't have restrictions regarding permissions and it doesn't work, it gave me the error code: 0x80246007
Then I tried the NTFS partition and copied the permissions from the download update folders using these command:
I have noticed not all the permssions were copied, so added them myself: like trustedinstaller and all packages ...etc. The owner was the system like in the old folder.
Still getting the same error.
The only thing I can think of that it is not a permssion issue but it is a space issue. cause it works fine if I change it to an external hard disk.
Any clues??
P.S. It would be nice if there is such an option to change it automatically like in the case if the Temp folder
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am not sure this is a good idea. To finish the install, Windows Update may assume that the content of SoftwareDistribution\Download is still present after a reboot, which is not the case with a ramdisk.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No it doesn't require the files after rebooting. I am doing it all the time with my locked external hard disk which can't be unlocked until I log in into windows, which it is after finishing the whole update process.
Even it is good for updating the windows store apps in windows 10 :) which doesn't require restart att all.
But it is strange that it wont work in the Ramdisk.
Last edit: paradis pal 2017-07-30
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In Win10 win updates and store apps fails to install even if we just move System Temp to RamDrive even with NTFS. I can't figure out why... it's an old thing.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Windows Update involves multiple different installers. There's the MSI installer, the CBS Installer (DISM), the Commandline-installer and the Standalone (WUSA) Installer. APPx-Packages use the APPx services. All of them require %temp% and C:\Windows\Temp to persist until after reboot, since they write temporary/state informtation there. Update will fail if that state-info is missing after reboot. The way I do it is, during startup, stop any involved service, robocopy /copyall /mt a folder to RamDisk, rename the folder to <folder>.Redirected, create the symlink (not junction), eg. mklink /d "<folder>" "<Folder> on RamDisk". At shutdown, I "revert" it back by doing the steps opposite way. Have a startup-/Shutdown-script using gpedit.msc at Computer Conf.->Windows Settings-> Scripts for these purposes. In startup-script you will need to create the NTFS-formatted ramdisk programmatically, since the service that would create it has not started yet at that point.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You need just these 2 lines, It is better to disable windows update service first and to run CMD as administrator. Check if Z is your Ram-disk and it SHOULD be formated in NTFS foramt otherwise it will not work
C:\WINDOWS\system32>RD /S /Q %windir%\SoftwareDistribution\Download
C:\WINDOWS\system32>mklink /d %windir%\SoftwareDistribution\Download A:\Temp
symbolic link created for C:\WINDOWS\SoftwareDistribution\Download <<===>> A:\Temp
Still in windows store Code: 0x80070001
Does it actually need to be z? Is there any fix for windows update/store installs yet?
Windows 10 Enterprise 1809 [17763.134]
Last edit: Chaython Meredith 2018-12-05
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Error 0x80070001 means that you have corrupted files. If you restore the download folder does the update work fine?
The update requires special permissions and that is why it needs NTFS (sometimes it works with ex-fat32). Messing with windows folders' permissions may cause errors.
Did you try it on other PCs, cause I have been using this on all my laptops, families' and friends' and it works!
I would suggest sfc.exe /scannow (cmd as admin) to repair your files, you will have nothing to lose.
I am sorry I couldn't help you :(
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Volume in drive C is MX300 SSD
Volume Serial Number is DC64-01C0
Directory of C:\Windows\SoftwareDistribution\Download
2019-03-15 08:40 AM <DIR> NT AUTHORITY\SYSTEM .
2019-03-15 08:40 AM <DIR> BUILTIN\Administrators ..
2019-03-13 02:28 PM <DIR> NT AUTHORITY\SYSTEM 02bf0bd7dc8a947583530282777b4f10
2019-03-12 04:22 AM <DIR> NT AUTHORITY\SYSTEM 034f72766f639a19799f0e9a4e0cc950
2019-03-15 08:25 AM <DIR> NT AUTHORITY\SYSTEM 045007d2aca0a7f004eb3598ee4af8d9
2019-03-15 08:25 AM <DIR> NT AUTHORITY\SYSTEM 058aee9a00a810be56c298d8d908c630
2019-03-13 02:55 PM <DIR> NT AUTHORITY\SYSTEM 05cd36261799dc11e02bbbf8dccd024b
2019-03-13 02:55 PM <DIR> NT AUTHORITY\SYSTEM 171adeb78fac46ba59d4ffa870004887
2019-03-12 03:01 PM <DIR> NT AUTHORITY\SYSTEM 378b4f0fe6a7ecbd44d6bef1651a29f9
2019-03-13 02:55 PM <DIR> NT AUTHORITY\SYSTEM 611ef4eec5a6cc2a341e00d652725187
2019-02-14 01:47 AM <DIR> NT AUTHORITY\SYSTEM 7bdde64f0a8ae10cb23505bde82c0159
2019-03-13 02:55 PM <DIR> NT AUTHORITY\SYSTEM 848150430b8bdb125d47221a83b0ab4d
2019-03-15 08:25 AM <DIR> NT AUTHORITY\SYSTEM 887661510bc4ab1e1bb2c75afcb5b330
2019-03-15 08:25 AM <DIR> NT AUTHORITY\SYSTEM 8f24333ea3a1798ef723b58b65d0e906
2019-03-13 02:28 PM <DIR> NT AUTHORITY\SYSTEM 988edef04794101244291bebedec43f2
2019-03-13 02:55 PM <DIR> NT AUTHORITY\SYSTEM 98b662241e062103e5de8110bb4a6af3
2019-03-13 02:28 PM <DIR> NT AUTHORITY\SYSTEM 9dc74a9ba7195cdb001a2aa5e20bd663
2019-03-13 02:28 PM <DIR> NT AUTHORITY\SYSTEM adc601d3cf680542b85b58ca7b211d88
2019-02-13 02:24 AM 2,249,248 NT AUTHORITY\SYSTEM b069a8f48933c5074c7889cf4f251fd580c409db
2019-03-12 04:22 AM <DIR> NT AUTHORITY\SYSTEM b3975d781573fd331ff0da3818ce1248
2019-03-15 08:25 AM <DIR> NT AUTHORITY\SYSTEM bbbf2244e7f22e9ad4d7c5bcb291d98c
2019-03-01 05:26 PM 19,902 NT AUTHORITY\SYSTEM bbd2dd5357815423d4a9d60990f0900879c55bf0
2019-03-13 02:55 PM <DIR> NT AUTHORITY\SYSTEM c048462634785a4539b9ec2a75f7d4ea
2019-02-07 09:01 PM 39,090 NT AUTHORITY\SYSTEM c3248eb572cb5f82e63ce9c6d73cfbf39b1052ae
2019-03-15 08:24 AM <DIR> NT AUTHORITY\SYSTEM cccd784410d8a0755b407bf2eaf38baa
2019-02-20 10:22 AM <DIR> NT AUTHORITY\SYSTEM d9d6f1c47ab8b0dcdc6aa5b2e07b09ad
2019-03-15 08:24 AM <DIR> NT AUTHORITY\SYSTEM db62fdd8183bdf4893d4d7e0676ba9e1
2019-03-15 08:24 AM <DIR> NT AUTHORITY\SYSTEM e9acd1ac78e4ddd20cfb2b98ac6fa3f5
2019-02-26 02:08 PM <DIR> NT AUTHORITY\SYSTEM ea5dc8f6a3b9bfe1e7ec5d960af0728d
2019-02-13 11:50 PM <DIR> NT AUTHORITY\SYSTEM f8797029c1783b8055810af49a41867a
2019-02-06 02:46 PM <DIR> NT AUTHORITY\SYSTEM SharedFileCache
3 File(s) 2,308,240 bytes
28 Dir(s) 280,914,550,784 bytes free
Last edit: Chaython Meredith 2019-03-15
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You cannot redirect C:\Windows\SoftwareDistribution\Download to any other drive anymore since Windows 10 1809/Server 2019, because Microsoft will use the folder to not only download, unpack and pre-stage the downloaded content, but since this windows-version. it skips the pre-staging and installs directly from this folder (the pre-staging step has been eliminated) using hardlinking. Hardlinking requires the content to be on the same drive it gets hardlinked from ! There is no way to get around this, but then again you don't have to, since the pre-staging step was the step that caused alot of intermediate copying and thus disk I/O. By eliminating this step, Microsoft has effectively sped up the install-process alot and avoided alot of intermediate disk I/O. This explains why installing a large Cumulative Update on 1809 goes a whole lot quicker than on previous Windows versions aswell. So because MS eliminated this pre-staging step, your benefit of redirecting this folder to save disk I/O has mostly been eliminated aswell. ie, since Windows 10 1809 it's fruitless redirecting this folder. Same is true for the folder C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Microsoft\Windows\DeliveryOptimization
We tried to optimize Microsoft's way of installing updates. Now, Microsoft themselfs have optimized it so we don't have to (and cannot do that) anymore :-)
Last edit: Wizard 2019-03-16
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
? Having it on means Windows tries to download pre-staged components from other PCs. It does so in C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Microsoft\Windows\DeliveryOptimization. It means at update-time it will only download missing content to C:\Windows\SoftwareDistribution\Download after having checked what's already in the deliveryoptimization folder, skipping that for downloading/unpacking/pre-staging. It's this principle and having deliveryopt. folder redirected to ramdisk that makes it not work. I'll try again with delivery optimization turned off...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hej,
I am thinking changing my windows update folder to the ramdisk to reduce the hard disk usage as much as possible.
I could change it to the external hard disk without problem regardless of the permissions, but when change it to the ramdisk it will not work.
Here is what I was doing.
At the beginning I had formatted to FAT32 which doesn't have restrictions regarding permissions and it doesn't work, it gave me the error code: 0x80246007
Then I tried the NTFS partition and copied the permissions from the download update folders using these command:
xcopy C:\Windows\SoftwareDistribution\Download Z:\Update /O /X /E /H /K
rd C:\Windows\SoftwareDistribution\Download /s /q
MKLINK /J C:\Windows\SoftwareDistribution\Download Z:\Update
I have noticed not all the permssions were copied, so added them myself: like trustedinstaller and all packages ...etc. The owner was the system like in the old folder.
Still getting the same error.
The only thing I can think of that it is not a permssion issue but it is a space issue. cause it works fine if I change it to an external hard disk.
Any clues??
P.S. It would be nice if there is such an option to change it automatically like in the case if the Temp folder
I am not sure this is a good idea. To finish the install, Windows Update may assume that the content of SoftwareDistribution\Download is still present after a reboot, which is not the case with a ramdisk.
No it doesn't require the files after rebooting. I am doing it all the time with my locked external hard disk which can't be unlocked until I log in into windows, which it is after finishing the whole update process.
Even it is good for updating the windows store apps in windows 10 :) which doesn't require restart att all.
But it is strange that it wont work in the Ramdisk.
Last edit: paradis pal 2017-07-30
In Win10 win updates and store apps fails to install even if we just move System Temp to RamDrive even with NTFS. I can't figure out why... it's an old thing.
Windows Update involves multiple different installers. There's the MSI installer, the CBS Installer (DISM), the Commandline-installer and the Standalone (WUSA) Installer. APPx-Packages use the APPx services. All of them require %temp% and C:\Windows\Temp to persist until after reboot, since they write temporary/state informtation there. Update will fail if that state-info is missing after reboot. The way I do it is, during startup, stop any involved service, robocopy /copyall /mt a folder to RamDisk, rename the folder to <folder>.Redirected, create the symlink (not junction), eg. mklink /d "<folder>" "<Folder> on RamDisk". At shutdown, I "revert" it back by doing the steps opposite way. Have a startup-/Shutdown-script using gpedit.msc at Computer Conf.->Windows Settings-> Scripts for these purposes. In startup-script you will need to create the NTFS-formatted ramdisk programmatically, since the service that would create it has not started yet at that point.
For me it doesn't need %temp% and C:\Windows\Temp to persist until after reboot.
All my temps are in the ramdisk, and when I use locked external hard disk it works.
The strange thing is when you updating windows drivers through winddows update and all the temps and downloads in the ram disk it will work.
Updating windows app doesn't require reboot att all and it will fail on Ramdisk but not on external drive
Funny thing mklink /d will work! Thanks @Wizard
You may consider add an option to change windows update temps to Ram disk it piece of cake.
RD /S /Q %systemdrive\Windows\SoftwareDistribution\Download
mklink /d %systemdrive\Windows\SoftwareDistribution\Download Z:\Temp
it did work
Last edit: paradis pal 2018-03-11
Paradis! Nice 9 months of trying and finally solve the issue!
Can you confirm these final 2 lines are all that is needed?
RD /S /Q %systemdrive\Windows\SoftwareDistribution\Download
mklink /d %systemdrive\Windows\SoftwareDistribution\Download Z:\Temp
Or do I need to do all the other ones as well? Xcopy etc
And this is windows 10? I have 10 Enterprise
You need just these 2 lines, It is better to disable windows update service first and to run CMD as administrator. Check if Z is your Ram-disk and it SHOULD be formated in NTFS foramt otherwise it will not work
RD /S /Q %windir%\SoftwareDistribution\Download
mklink /d %windir%\SoftwareDistribution\Download Z:\Temp
Make sure you have at least 2.5-3GB ram drive if not more, recommended 5GB
Last edit: paradis pal 2018-04-06
After reading this; I hoped it fixed windows update in windows 10 but it didn't :(
Still in windows store Code: 0x80070001
Does it actually need to be z? Is there any fix for windows update/store installs yet?
Windows 10 Enterprise 1809 [17763.134]
Last edit: Chaython Meredith 2018-12-05
Did you format the Ram-disk into NTFS?
What size is the RAM-disk? is it more than 3 GB ( mine is 16GB)
It works fine here up to the last buildwindows 1809 build 195, and it works in windows 7 and 8,1 confirmed
Last edit: paradis pal 2018-12-28
10gb dynamic ntfs awe
format/advanced proprities doesn't matter I've tried every variable
Last edit: Chaython Meredith 2018-12-30
Error 0x80070001 means that you have corrupted files. If you restore the download folder does the update work fine?
The update requires special permissions and that is why it needs NTFS (sometimes it works with ex-fat32). Messing with windows folders' permissions may cause errors.
Did you try it on other PCs, cause I have been using this on all my laptops, families' and friends' and it works!
I would suggest sfc.exe /scannow (cmd as admin) to repair your files, you will have nothing to lose.
I am sorry I couldn't help you :(
I run sfc and dism weekly;
Issue has persisted over multiple builds and instalations
This error is only present while using imdisk
Using command line CMD can you write these commands and return the results
CD C:\Windows\SoftwareDistribution
DIR /Q
DIR Download /Q
icacls Download
Last edit: Chaython Meredith 2019-03-15
You cannot redirect C:\Windows\SoftwareDistribution\Download to any other drive anymore since Windows 10 1809/Server 2019, because Microsoft will use the folder to not only download, unpack and pre-stage the downloaded content, but since this windows-version. it skips the pre-staging and installs directly from this folder (the pre-staging step has been eliminated) using hardlinking. Hardlinking requires the content to be on the same drive it gets hardlinked from ! There is no way to get around this, but then again you don't have to, since the pre-staging step was the step that caused alot of intermediate copying and thus disk I/O. By eliminating this step, Microsoft has effectively sped up the install-process alot and avoided alot of intermediate disk I/O. This explains why installing a large Cumulative Update on 1809 goes a whole lot quicker than on previous Windows versions aswell. So because MS eliminated this pre-staging step, your benefit of redirecting this folder to save disk I/O has mostly been eliminated aswell. ie, since Windows 10 1809 it's fruitless redirecting this folder. Same is true for the folder C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Microsoft\Windows\DeliveryOptimization
We tried to optimize Microsoft's way of installing updates. Now, Microsoft themselfs have optimized it so we don't have to (and cannot do that) anymore :-)
Last edit: Wizard 2019-03-16
It does work on Windows 10 1809 with me! No problem in windows update at all.
Is that while you're making use of Delivery Optimization, or do you have that turned off ?
(Settings->Windows Update->Advanced->Delivery Optimization)
Last edit: Wizard 2019-03-17
I turned it off, as there is no piont using it when the download folder i in Ram-disk
? Having it on means Windows tries to download pre-staged components from other PCs. It does so in C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Microsoft\Windows\DeliveryOptimization. It means at update-time it will only download missing content to C:\Windows\SoftwareDistribution\Download after having checked what's already in the deliveryoptimization folder, skipping that for downloading/unpacking/pre-staging. It's this principle and having deliveryopt. folder redirected to ramdisk that makes it not work. I'll try again with delivery optimization turned off...
It doesn't work in Windows 11 anymore, still working in windows 10 so far
@v77 I found out why Windows update doesn't work when linking the download fodler to ImDisk RamDisk.
It is because ImDisk mount the RamDisk as none physical disk.
I tried AMD RamDisk and it worked, as AMD RamDisk mount the RamDisk as a physical disk. Please see the attached photo