
One of the most useful and powerful built-in utility in Windows 10 is the DISM tool. This tool can be used with the Command Prompt command line as well as for other purposes. However, it is not without flaws and there are times when you may encounter some issues while using it.
One of the problems you can get while using the DISM tool is the following error:
“The scratch directory size might be insufficient to perform this operation”
This kind of error in DISM occurs when the DISM command is executed from the Windows Recovery Environment due to the limited size permissions of a delivery where the operating is being performed. To fix this DISM error, you need to follow the instructions laid out below.
Step 1: First, tap the Win + R keys to open the Run utility and then type “cmd” in the field and tap Enter to open Command Prompt.
Step 2: Next, you have to specify a scratch directory that contains the Windows folder and to do that, you can either use the DIR command or the BCEDIT command. So in the elevated command prompt type and enter “dir” or “bcedit”.
Step 3: After that, you will see a list of folders inside the C: partition. Now you have to create a folder named “scratch” inside the partition. To do so, execute the following command:
mkdir C:Scratch
Note: The command you just entered will create a directory inside the root of the C: partition named Scratch.
Step 4: Now that you’ve created the Scratch folder, note that each time you run any of the DISM commands, you have to enter the following code snippet in them:
/ScratchDir:C:Scratch
Note: For instance, if you are using the DISM tool to repair the offline Windows image, instead of executing the “Dism /Online /Cleanup-Image /RestoreHealth” command, you now have to execute the “DISM /Image:C: /ScratchDir:C: Scratch /Cleanup-Image /Restorehealth” command. And if you want to remove a selected installed update package, you can use the “DISM /image:C: /ScratchDir:C:Scratch /Remove-Package /PackageName:Package_for_RollupFix~31bf3856ad364e75~amd64~~16299.196.4.9” command. Keep in mind that the mentioned package is only an example. And lastly, you also have to replace the drive letter in the new code snippet when you execute the commands given above.
regsvr32.exe vbscript.dll
Some users trying to upgrade from Windows 7 or Windows 8/8.1 reported experiencing installation rollback with error code 0x80070004. This error normally appears when the Computer Name is set to names that can’t be used for the computer. It’s also possible this error occurs if users or program files folder were redirected to a different partition.
The Error code 0x80070004 on Windows 10 is normally caused if any of the following were used as the Computer Name and the user tried to upgrade to Windows 10:
If you don’t solve this error, you won’t be able to upgrade from Windows 7 or Windows 8/8.1 to Windows 10. Note that this error will continuously bring you back to the original OS unless fixed.
Please note that if you’re not confident in doing these steps, you might want to consider seeking the help of an expert or using an automated tool that will help fix this.
Here are a few methods to try.
The most common cause of this error is if your computer uses any of the following reserved names:
These reserved names are not meant to be used as computer names. If this is what your computer uses and you try to upgrade to Windows 10, you will surely get this error. Check your computer name and if you see any of the reserved names, change it right away.
Changing Computer Name in Windows 8.1
If you’re trying to upgrade from Windows 8.1, you can change the name of the computer by following these steps:
Changing Computer Name in Windows 7
If you’re trying to upgrade from Windows, you can follow the steps below to change the name of your computer.
If the first method doesn't work, it probably means the computer name isn’t the cause of this error. Another reason why users experience Error code 0x80070004 when upgrading to Windows 10 is if the “Users” directory was relocated. So, when you try upgrading to Windows 10, the installer wasn’t able to find the user profiles on the “%systemdrive%”, where the current operating system is installed.
If you changed or moved any of the Users, Program Data, or Program Files folders, this will cause the error. Before you upgrade to Windows 10, you might be required to reset or reinstall your current operating system (Windows 7 or Windows 8.1).
If you haven’t made any changes or haven’t moved any of the mentioned folders, there’s a great chance that your users' profiles are corrupted. You can also reinstall your current operating system. However, you might want to check for the corrupter user profile first. To do this, follow the steps below:
On the Users Profiles, make a copy of all the accounts somewhere. Sign out from the current user account then try logging in back using the accounts you’ve copied. For each account, you get an error, delete it. However, make sure that you don’t delete the UpdateUser and Administrator account ever.
After this is done, try upgrading your operating system to windows 10 again.
If the above methods still not useful, you might want to rely on an automated tool. Find a secured and trusted tool. It will help fix this issue.
chkdsk /f /r
Get-AppxPackage -allusers Microsoft.WindowsStore | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)AppXManifest.xml"Another option is to download a Windows Update Troubleshooter. After you download it, open the troubleshooter tool and follow the steps. If you saved the file instead of directly opening it, go to the folder where the troubleshooter was saved and double click on the wu.diagcab file to rub the troubleshooter. One of the most interesting error codes that you might encounter when accessing the Microsoft store is error code 1. This particular error code is resolved by changing your PC’s region to the United States. To do this, go to Settings and look for Time & Language. Then go to region and language. Under the Country or region, choose the United States from the dropdown menu then restart your computer. The troubleshooting procedures above are the most common solution to resolve the problem on Microsoft Store issues but there are times that these procedures won’t work. If you are not confident to resolve this through the procedures mentioned in this article, there are so many tools online that you can download to help you out. It also helps to contact Microsoft or consult a technician to ensure that you are doing the correct procedure.