create account

Installing updates on Windows 10 when Windows Update fails to install by mtl1979

View this thread on: hive.blogpeakd.comecency.com
· @mtl1979 · (edited)
$0.11
Installing updates on Windows 10 when Windows Update fails to install
Prerequisites:
* Windows installer image from:
   * Windows Media Creation Tool
   * Windows installation disc 
   * USB memory stick
   * copied to hard disk
* individual updates as `*.msu` or `*.cab` files in "%USERPROFILE%\Downloads"
* Command Prompt opened as Administrator

NOTES:
1. You can skip creating some directories if they already exist. 
2. Steemit might split some commands as multiple lines, but each command must be entered as single line.

## Step 1 ##
Extract all `*.cab` files from all `*.msu` files

For example:
<code>
cd %USERPROFILE%\Downloads
md KB5004237
expand -f:* "windows10.0-kb5004237-x64_9a7c569f5656d99533e9e945e8063251758ce4c0.msu" KB5004237
cd KB5004237
md KB5004237
expand -f:* "Windows10.0-KB5004237-x64.cab" KB5004237
cd KB5004237
dir update.*
</code>

## Step 2 ##

If you don't have `install.wim`, mount ISO image created by Windows Media Creation Tool or insert Windows 10 DVD in drive or plug in USB memory stick.

Convert `install.esd` to `install.wim`: (assuming the Windows installer is drive `E:` and you have `Windows 10 Home`)
<code>
md C:\\$Windows.~WS
md C:\\$Windows.~WS\Sources
Dism /Export-Image /SourceImageFile:E:\sources\install.esd /SourceIndex:1 /DestinationImageFile:C:\\$Windows.~WS\Sources /Compress:Max /CheckIntegrity
</code>

For other Windows versions, you need to check the image index using:
<code>
Dism /Get-WimInfo /WimFile:E:\sources\install.esd
</code>

## Step 3 ##

Copy everything from drive `E:` except `sources\install.esd` to `C:\$Windows.~WS\`.

You can select all directories except sources and copy them first, then open `sources` directory, sort by size and select everything except `install.esd`, and copy its contents to `C:\$Windows.~WS\Sources`.

## Step 4 ##

Apply updates to `install.wim`:
<code>
md C:\install
Dism /Mount-Image /ImageFile:C:\\$Windows.~WS\Sources\install.wim /Name:"Windows 10 Home" /MountDir:C:\install
</code>

Change to the directory containing `update.mum` starting from lowest KB number, for example `%USERPROFILE%\Downloads\KB5004237\KB5004237` created above:
<code>
cd "%USERPROFILE%\Downloads\KB5004237\KB5004237"
Dism /Image:C:\install /Add-Package /PackagePath:.
</code>

Repeat for all other updates.

## Step 5 ##

Refresh `install.wim` to integrate all updates:
<code>
md c:\temp
Dism /Cleanup-Image /Image:"C:\install" /StartComponentCleanup /ResetBase /ScratchDir:C:\temp
Dism /Unmount-Image /MountDir:C:\install /Commit
</code>

## Step 6 ##

Run `setup.exe` in directory `C:\$Windows.~WS`.

Windows will restart after backing up files and start installing updates.
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 16 others
properties (23)
authormtl1979
permlinkinstalling-updates-on-windows-10-when-windows-update-fails-to-install
categorywindows
json_metadata{"app":"peakd/2021.07.2","format":"markdown","tags":["windows","updating","installer","slipstream"],"users":[],"image":[]}
created2021-07-23 04:50:27
last_update2021-07-23 08:26:48
depth0
children0
last_payout2021-07-30 04:50:27
cashout_time1969-12-31 23:59:59
total_payout_value0.056 HBD
curator_payout_value0.056 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,587
author_reputation901,077,179,728
root_title"Installing updates on Windows 10 when Windows Update fails to install"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id105,076,390
net_rshares209,587,625,850
author_curate_reward""
vote details (80)