Skip to content

Commit

Permalink
remain
Browse files Browse the repository at this point in the history
  • Loading branch information
xrgzs committed Apr 26, 2024
1 parent 4833f4f commit 2afe3f6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions msupdate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +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
for ($i = 1; $i -le $WIMIndexs; $i++) {
$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
# .\bin\wimlib-imagex.exe delete ".\ISO\sources\install.wim" $i --soft
Remove-WindowsImage -ImagePath ".\ISO\sources\install.wim" -Index $i
$remainingImages--
}
}

Expand Down

0 comments on commit 2afe3f6

Please sign in to comment.