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 Compile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,20 @@ $xaml
'@
"@)

Update-Progress "Adding: autounattend.xml" 95
$autounattendRaw = Get-Content "$workingdir\tools\autounattend.xml" -Raw
# Strip XML comments (<!-- ... -->, including multi-line)
$autounattendRaw = [regex]::Replace($autounattendRaw, '<!--.*?-->', '', [System.Text.RegularExpressions.RegexOptions]::Singleline)
# Drop blank lines and trim trailing whitespace per line
$autounattendXml = ($autounattendRaw -split "`r?`n" |
Where-Object { $_.Trim() -ne '' } |
ForEach-Object { $_.TrimEnd() }) -join "`r`n"
$script_content.Add(@"
`$WinUtilAutounattendXml = @'
$autounattendXml
'@
"@)

$script_content.Add($(Get-Content "scripts\main.ps1"))

Update-Progress "Removing temporary files" 99
Expand Down
4 changes: 4 additions & 0 deletions config/themes.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,12 @@
"ButtonTweaksBackgroundColor": "#F7F7F7",
"ButtonConfigBackgroundColor": "#F7F7F7",
"ButtonUpdatesBackgroundColor": "#F7F7F7",
"ButtonWin11ISOBackgroundColor": "#F7F7F7",
"ButtonInstallForegroundColor": "#232629",
"ButtonTweaksForegroundColor": "#232629",
"ButtonConfigForegroundColor": "#232629",
"ButtonUpdatesForegroundColor": "#232629",
"ButtonWin11ISOForegroundColor": "#232629",
"ButtonBackgroundColor": "#F5F5F5",
"ButtonBackgroundPressedColor": "#1A1A1A",
"ButtonBackgroundMouseoverColor": "#C2C2C2",
Expand Down Expand Up @@ -105,10 +107,12 @@
"ButtonTweaksBackgroundColor": "#333333",
"ButtonConfigBackgroundColor": "#444444",
"ButtonUpdatesBackgroundColor": "#555555",
"ButtonWin11ISOBackgroundColor": "#666666",
"ButtonInstallForegroundColor": "#F7F7F7",
"ButtonTweaksForegroundColor": "#F7F7F7",
"ButtonConfigForegroundColor": "#F7F7F7",
"ButtonUpdatesForegroundColor": "#F7F7F7",
"ButtonWin11ISOForegroundColor": "#F7F7F7",
"ButtonBackgroundColor": "#1E3747",
"ButtonBackgroundPressedColor": "#F7F7F7",
"ButtonBackgroundMouseoverColor": "#3B4252",
Expand Down
779 changes: 779 additions & 0 deletions functions/private/Invoke-WinUtilISO.ps1

Large diffs are not rendered by default.

331 changes: 331 additions & 0 deletions functions/private/Invoke-WinUtilISOScript.ps1

Large diffs are not rendered by default.

52 changes: 52 additions & 0 deletions scripts/main.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ $commonKeyEvents = {
"T" { Invoke-WPFButton "WPFTab2BT"; $keyEventArgs.Handled = $true } # Navigate to Tweaks tab
"C" { Invoke-WPFButton "WPFTab3BT"; $keyEventArgs.Handled = $true } # Navigate to Config tab
"U" { Invoke-WPFButton "WPFTab4BT"; $keyEventArgs.Handled = $true } # Navigate to Updates tab
"W" { Invoke-WPFButton "WPFTab5BT"; $keyEventArgs.Handled = $true } # Navigate to Win11ISO tab
}
}
# Handle Ctrl key combinations for specific actions
Expand Down Expand Up @@ -531,5 +532,56 @@ $sync["FontScalingApplyButton"].Add_Click({
Invoke-WPFPopup -Action "Hide" -Popups @("FontScaling")
})

# ── Win11ISO Tab button handlers ──────────────────────────────────────────────

$sync["WPFWin11ISOBrowseButton"].Add_Click({
Write-Debug "WPFWin11ISOBrowseButton clicked"
Invoke-WinUtilISOBrowse
})

$sync["WPFWin11ISODownloadLink"].Add_Click({
Write-Debug "WPFWin11ISODownloadLink clicked"
Start-Process "https://www.microsoft.com/software-download/windows11"
})

$sync["WPFWin11ISOMountButton"].Add_Click({
Write-Debug "WPFWin11ISOMountButton clicked"
Invoke-WinUtilISOMountAndVerify
})

$sync["WPFWin11ISOModifyButton"].Add_Click({
Write-Debug "WPFWin11ISOModifyButton clicked"
Invoke-WinUtilISOModify
})

$sync["WPFWin11ISOChooseISOButton"].Add_Click({
Write-Debug "WPFWin11ISOChooseISOButton clicked"
$sync["WPFWin11ISOOptionUSB"].Visibility = "Collapsed"
Invoke-WinUtilISOExport
})

$sync["WPFWin11ISOChooseUSBButton"].Add_Click({
Write-Debug "WPFWin11ISOChooseUSBButton clicked"
$sync["WPFWin11ISOOptionUSB"].Visibility = "Visible"
Invoke-WinUtilISORefreshUSBDrives
})

$sync["WPFWin11ISORefreshUSBButton"].Add_Click({
Write-Debug "WPFWin11ISORefreshUSBButton clicked"
Invoke-WinUtilISORefreshUSBDrives
})

$sync["WPFWin11ISOWriteUSBButton"].Add_Click({
Write-Debug "WPFWin11ISOWriteUSBButton clicked"
Invoke-WinUtilISOWriteUSB
})

$sync["WPFWin11ISOCleanResetButton"].Add_Click({
Write-Debug "WPFWin11ISOCleanResetButton clicked"
Invoke-WinUtilISOCleanAndReset
})

# ──────────────────────────────────────────────────────────────────────────────

$sync["Form"].ShowDialog() | out-null
Stop-Transcript
Loading
Loading