Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
windows 10 install.wim extraction and using it for MSU
notes on dism etc
download matching windows 10 ISO matching winver.exe, mount the iso or extract it
Mount-DiskImage -ImagePath "c:\temp\Windows-10x64.iso"
(Get-DiskImage "c:\temp\Windows-10x64.iso" | Get-Volume).DriveLetter
if htere is no install.wim and its an install.esd instead
and change to the directory where it is, show the types of windows that are available
dism /Get-WimInfo /WimFile:install.esd
find the matching id for the current OS install (Pro etc), and set the SourceIndex correctly, set a output folder and extract the from the esd
dism /export-image /SourceImageFile:install.esd /SourceIndex:6 /DestinationImageFile:F:\install.wim /Compress:max /CheckIntegrity
msu cmd line install
wusa.exe c:\Temp\windows10.0-kb5005033-x64_ebab415d7a65f0b33f93e9a30875d74baa8930a7.msu /quiet /norestart
for failed windows update MSUs (like if you removed defender), see C:\Windows\Logs\dism\dism.log or C:\Windows\Logs\cbs\CBS.log
expand the msu
expand -F:* c:\temp\windows10.0-kb5005033-x64_ebab415d7a65f0b33f93e9a30875d74baa8930a7.msu C:\temp\cab
try passing /Source to the wim to the /Add-Package and the cab of the msu, or the msu to dism and attempt the install again (wim is usually a >4GB file)
DISM /Online /Add-Package /PackagePath:c:\temp\cab\ /Source:c:\temp\install.wim
though dism does seem to complain about the /Source option (see dism.log) and its not listed for /Add-Package
mount wim
dism /mount-wim /WimFile:g:\sources\install.wim /Index:7 /mountdir:F:\wim\ /ReadOnly
dism /Online /Enable-Feature /FeatureName:Windows-Defender /all /source:WIM:g:\sources\install.wim:7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment