Created
April 12, 2018 07:52
-
-
Save guoxiaoqiao/792fe6a458f3820f9c679c0e3af5ae83 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if([System.IO.File]::Exists("C:\win10\install.wim")){ | |
dism /unmount-wim /mountdir:C:\win10\wim /discard | |
dism /Cleanup-Wim | |
rm C:\win10\install.wim | |
} | |
copy H:\sources\install.wim c:\win10\ | |
Set-ItemProperty C:\win10\install.wim -name IsReadOnly -value $false | |
dism /mount-wim /wimfile:C:\win10\install.wim /index:1 /mountdir:C:\win10\wim | |
dism /image:C:\win10\wim /Add-Package /PackagePath:F:\win10-update | |
Dism.exe /image:C:\win10\wim /Cleanup-Image /AnalyzeComponentStore | |
dism /image:C:\win10\wim /cleanup-image /startcomponentcleanup | |
Dism.exe /image:C:\win10\wim /Cleanup-Image /AnalyzeComponentStore | |
dism /unmount-wim /mountdir:C:\win10\wim /commit | |
dism /Cleanup-Wim | |
if([System.IO.File]::Exists("C:\win10\install-large.wim")){ | |
rm C:\win10\install-large.wim | |
} | |
mv C:\win10\install.wim C:\win10\install-large.wim | |
Dism /Export-Image /SourceImageFile:C:\win10\install-large.wim /SourceIndex:1 /DestinationImageFile:c:\win10\install.wim |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment