Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions functions/microwin/Invoke-Microwin.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,20 @@ public class PowerManagement {
}
Write-Host "Windows image completed. Continuing with boot.wim."

$esd = $sync.MicroWinESD.IsChecked
if ($esd) {
Write-Host "Converting install image to ESD."
try {
Export-WindowsImage -SourceImagePath "$mountDir\sources\install.wim" -SourceIndex $index -DestinationImagePath "$mountDir\sources\install.esd" -CompressionType "Recovery"
Remove-Item "$mountDir\sources\install.wim"
Write-Host "Converted install image to ESD."
} catch {
Start-Process -FilePath "$env:SystemRoot\System32\dism.exe" -ArgumentList "/export-image /sourceimagefile:`"$mountDir\sources\install.wim`" /sourceindex:1 /destinationimagefile:`"$mountDir\sources\install.esd`" /compress:recovery" -Wait -NoNewWindow
Remove-Item "$mountDir\sources\install.wim"
Write-Host "Converted install image to ESD."
}
}

# Next step boot image
Write-Host "Mounting boot image $mountDir\sources\boot.wim into $scratchDir"
Mount-WindowsImage -ImagePath "$mountDir\sources\boot.wim" -Index 2 -Path "$scratchDir"
Expand Down
1 change: 1 addition & 0 deletions xaml/inputXML.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -1393,6 +1393,7 @@
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap"><Bold>Tweaks (leave empty for default settings)</Bold></TextBlock>
<CheckBox Name="MicroWinWPBT" Content="Disable Windows Platform Binary Table (WPBT) (ADVANCED TWEAK)" Margin="{DynamicResource MicrowinCheckBoxMargin}" IsChecked="False" ToolTip="If enabled then allows your computer vendor to execute a program each time it boots. It enables computer vendors to force install anti-theft software, software drivers, or a software program conveniently. This could also be a security risk."/>
<CheckBox Name="MicroWinUnsupported" Content="Allow this PC upgarde to Windows 11" Margin="{DynamicResource MicrowinCheckBoxMargin}" IsChecked="False" ToolTip="If enabled then it will allow you to upgrade your PC to Windows 11 if your PC does not support Windows 11 yet. This is good for if you do not have a USB and want to upgarde to Windows 11 on unsupported OS. This is good for if you do not have a USB and want to upgarde to Windows 11 on unsupported OS. This is good for if you do not have a USB and want to upgarde to Windows 11 on unsupported Hardware."/>
<CheckBox Name="MicroWinESD" Content="Convert this image to ESD (This will take longer)" Margin="{DynamicResource MicrowinCheckBoxMargin}" IsChecked="False" ToolTip="If enabled then MicroWin will convert this image to ESD format. This is good for if you have a small USB and want to convert your ISO to ESD format."/>
<Rectangle Fill="{DynamicResource MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
<Button Name="WPFMicrowin" Content="Start the process" Margin="2" Padding="15"/>
</StackPanel>
Expand Down