Skip to content

Commit

Permalink
for
Browse files Browse the repository at this point in the history
  • Loading branch information
xrgzs committed Apr 26, 2024
1 parent 2afe3f6 commit 59ecb95
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions msupdate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,12 @@ if ($?) {Write-Host "System Image Download Successfully!"} else {Write-Error "Sy
$WIMInfo = [xml](Get-Content ".\temp\WIMInfo.xml")
$WIMIndex = $WIMInfo.WIM.IMAGE | Where-Object {$_.WINDOWS.EDITIONID -eq "Professional"} | Select-Object -ExpandProperty INDEX
$WIMIndexs = $WIMInfo.WIM.IMAGE.Index | Measure-Object | Select-Object -ExpandProperty Count
$remainingImages = $WIMIndexs
for ($i = 1; $i -le $remainingImages; $i++) {
if ($i -ne $WIMIndex) {
# .\bin\wimlib-imagex.exe delete ".\ISO\sources\install.wim" $i --soft
Remove-WindowsImage -ImagePath ".\ISO\sources\install.wim" -Index $i
$remainingImages--
}
for ($i = $WIMIndexs; $i -gt $WIMIndex; $i--) {
# .\bin\wimlib-imagex.exe delete ".\ISO\sources\install.wim" $i --soft
Remove-WindowsImage -ImagePath ".\ISO\sources\install.wim" -Index $i
}
for ($i = 1; $i -lt $WIMIndex; $i++) {
Remove-WindowsImage -ImagePath ".\ISO\sources\install.wim" -Index 1
}

# write W10UI conf
Expand Down

0 comments on commit 59ecb95

Please sign in to comment.