mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-12-28 08:51:31 -06:00
Merge b5c80bfbd2
into ce1ef2a519
This commit is contained in:
commit
a3c478d975
@ -260,19 +260,25 @@ function Invoke-WPFGetIso {
|
||||
$wimFile = $wimFile.Replace(".wim", ".esd").Trim()
|
||||
}
|
||||
$sync.MicrowinWindowsFlavors.Items.Clear()
|
||||
Get-WindowsImage -ImagePath $wimFile | ForEach-Object {
|
||||
|
||||
$images = Get-WindowsImage -ImagePath $wimFile
|
||||
|
||||
# Populate the list of Windows flavors and find the Pro edition
|
||||
$images | ForEach-Object {
|
||||
$imageIdx = $_.ImageIndex
|
||||
$imageName = $_.ImageName
|
||||
|
||||
$sync.MicrowinWindowsFlavors.Items.Add("$imageIdx : $imageName")
|
||||
}
|
||||
|
||||
$sync.MicrowinWindowsFlavors.SelectedIndex = 0
|
||||
Write-Host "Finding suitable Pro edition. This can take some time. Do note that this is an automatic process that might not select the edition you want."
|
||||
Get-WindowsImage -ImagePath $wimFile | ForEach-Object {
|
||||
|
||||
if ((Get-WindowsImage -ImagePath $wimFile -Index $_.ImageIndex).EditionId -eq "Professional") {
|
||||
# We have found the Pro edition
|
||||
$sync.MicrowinWindowsFlavors.SelectedIndex = $_.ImageIndex - 1
|
||||
}
|
||||
}
|
||||
|
||||
Get-Volume $driveLetter | Get-DiskImage | Dismount-DiskImage
|
||||
Write-Host "Selected value '$($sync.MicrowinWindowsFlavors.SelectedValue)'....."
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user