mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-04-05 22:28:31 +00:00
Fix: Prevent Win11 Creator UI reset when switching tabs during ISO Creation (#4199)
* Fix: Prevent Win11 Creator UI reset when switching tabs during ISO modification * Update Invoke-WinUtilISO.ps1
This commit is contained in:
@@ -144,6 +144,7 @@ function Invoke-WinUtilISOModify {
|
|||||||
Write-Win11ISOLog "Selected edition: $selectedEditionName (Index $selectedWimIndex)"
|
Write-Win11ISOLog "Selected edition: $selectedEditionName (Index $selectedWimIndex)"
|
||||||
|
|
||||||
$sync["WPFWin11ISOModifyButton"].IsEnabled = $false
|
$sync["WPFWin11ISOModifyButton"].IsEnabled = $false
|
||||||
|
$sync["Win11ISOModifying"] = $true
|
||||||
|
|
||||||
$existingWorkDir = Get-Item -Path (Join-Path $env:TEMP "WinUtil_Win11ISO*") -ErrorAction SilentlyContinue |
|
$existingWorkDir = Get-Item -Path (Join-Path $env:TEMP "WinUtil_Win11ISO*") -ErrorAction SilentlyContinue |
|
||||||
Where-Object { $_.PSIsContainer } | Sort-Object LastWriteTime -Descending | Select-Object -First 1
|
Where-Object { $_.PSIsContainer } | Sort-Object LastWriteTime -Descending | Select-Object -First 1
|
||||||
@@ -303,6 +304,7 @@ function Invoke-WinUtilISOModify {
|
|||||||
})
|
})
|
||||||
} finally {
|
} finally {
|
||||||
Start-Sleep -Milliseconds 800
|
Start-Sleep -Milliseconds 800
|
||||||
|
$sync["Win11ISOModifying"] = $false
|
||||||
$sync["WPFWin11ISOStatusLog"].Dispatcher.Invoke([action]{
|
$sync["WPFWin11ISOStatusLog"].Dispatcher.Invoke([action]{
|
||||||
$sync.progressBarTextBlock.Text = ""
|
$sync.progressBarTextBlock.Text = ""
|
||||||
$sync.progressBarTextBlock.ToolTip = ""
|
$sync.progressBarTextBlock.ToolTip = ""
|
||||||
@@ -323,6 +325,11 @@ function Invoke-WinUtilISOModify {
|
|||||||
function Invoke-WinUtilISOCheckExistingWork {
|
function Invoke-WinUtilISOCheckExistingWork {
|
||||||
if ($sync["Win11ISOContentsDir"] -and (Test-Path $sync["Win11ISOContentsDir"])) { return }
|
if ($sync["Win11ISOContentsDir"] -and (Test-Path $sync["Win11ISOContentsDir"])) { return }
|
||||||
|
|
||||||
|
# Check if ISO modification is currently in progress
|
||||||
|
if ($sync["Win11ISOModifying"]) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
$existingWorkDir = Get-Item -Path (Join-Path $env:TEMP "WinUtil_Win11ISO*") -ErrorAction SilentlyContinue |
|
$existingWorkDir = Get-Item -Path (Join-Path $env:TEMP "WinUtil_Win11ISO*") -ErrorAction SilentlyContinue |
|
||||||
Where-Object { $_.PSIsContainer } | Sort-Object LastWriteTime -Descending | Select-Object -First 1
|
Where-Object { $_.PSIsContainer } | Sort-Object LastWriteTime -Descending | Select-Object -First 1
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user