Lots of changes :)

This commit is contained in:
rbalsleyMSFT
2025-02-06 13:00:11 -08:00
committed by rbalsleyMSFT
parent 837d4ef7ee
commit 735c1ce688
2 changed files with 629 additions and 582 deletions
+259 -214
View File
@@ -46,9 +46,10 @@ $allowedFeatures = @(
"ServicesForNFS-ClientOnly","SimpleTCP","SMB1Protocol","SMB1Protocol-Client","SMB1Protocol-Deprecation", "ServicesForNFS-ClientOnly","SimpleTCP","SMB1Protocol","SMB1Protocol-Client","SMB1Protocol-Deprecation",
"SMB1Protocol-Server","SmbDirect","TFTP","TelnetClient","TIFFIFilter","VirtualMachinePlatform","WAS-ConfigurationAPI", "SMB1Protocol-Server","SmbDirect","TFTP","TelnetClient","TIFFIFilter","VirtualMachinePlatform","WAS-ConfigurationAPI",
"WAS-NetFxEnvironment","WAS-ProcessModel","WAS-WindowsActivationService","WCF-HTTP-Activation","WCF-HTTP-Activation45", "WAS-NetFxEnvironment","WAS-ProcessModel","WAS-WindowsActivationService","WCF-HTTP-Activation","WCF-HTTP-Activation45",
"WCF-MSMQ-Activation45","WCF-NonHTTP-Activation","WCF-Pipe-Activation45","WCF-Services45","WCF-TCP-Activation45", "WCF-MSMQ-Activation45","WCF-MSMQ-Activation","WCF-NonHTTP-Activation","WCF-Pipe-Activation45","WCF-Services45",
"WCF-TCP-PortSharing45","Windows-Defender-ApplicationGuard","Windows-Defender-Default-Definitions","Windows-Identity-Foundation", "WCF-TCP-Activation45","WCF-TCP-PortSharing45","UpdateEdge","UpdateLatestCU","UpdateLatestDefender",
"WindowsMediaPlayer","WorkFolders-Client" "UpdateLatestMSRT","UpdateLatestNet","UpdateOneDrive","UpdatePreviewCU","Windows-Defender-ApplicationGuard",
"Windows-Defender-Default-Definitions","Windows-Identity-Foundation","WindowsMediaPlayer","WorkFolders-Client"
) )
$skuList = @( $skuList = @(
@@ -122,39 +123,62 @@ function Set-ImageSource {
} }
function Get-UIConfig { function Get-UIConfig {
# Basic tab # --- Build Tab Values ---
$ffuDevPath = $window.FindName('txtFFUDevPath').Text $ffuDevPath = $window.FindName('txtFFUDevPath').Text
$ffuName = $window.FindName('txtFFUName').Text $customFFUNameTemplate = $window.FindName('txtCustomFFUNameTemplate').Text
$vmSwitchSelected = $window.FindName('cmbVMSwitchName').SelectedItem $ffuCaptureLocation = $window.FindName('txtFFUCaptureLocation').Text
$customVMSwitch = $window.FindName('txtCustomVMSwitchName').Text $shareName = $window.FindName('txtShareName').Text
$vmHostIPAddress = $window.FindName('txtVMHostIPAddress').Text $username = $window.FindName('txtUsername').Text
# Windows tab # General Build Options (Build tab WrapPanel)
$buildUSB = $window.FindName('chkBuildUSBDrive').IsChecked
$compactOS = $window.FindName('chkCompactOS').IsChecked
$optimize = $window.FindName('chkOptimize').IsChecked
$createCapture = $window.FindName('chkCreateCaptureMedia').IsChecked
$createDeployMedia = $window.FindName('chkCreateDeploymentMedia').IsChecked
# Build USB Drive Section (new)
$buildUSB_USB = $window.FindName('chkBuildUSBDrive').IsChecked
$promptExt = $window.FindName('chkPromptExternalHardDiskMedia').IsChecked
$allowExt = $window.FindName('chkAllowExternalHardDiskMedia').IsChecked
# USB Drive Modification group (Build tab right column in new section)
$copyAutopilot = $window.FindName('chkCopyAutopilot').IsChecked
$copyUnattend = $window.FindName('chkCopyUnattend').IsChecked
$copyPPKG = $window.FindName('chkCopyPPKG').IsChecked
# --- Hyper-V Settings (from Hyper-V tab) ---
$cmbVMSwitch = $window.FindName('cmbVMSwitchName')
$vmSwitchName = $cmbVMSwitch.SelectedItem
if ($vmSwitchName -eq 'Other') { $vmSwitchName = $window.FindName('txtCustomVMSwitchName').Text }
$vmHostIPAddress = $window.FindName('txtVMHostIPAddress').Text
[int64]$diskSizeInGB = [int64]$window.FindName('txtDiskSize').Text
$diskSize = $diskSizeInGB * 1GB
[int64]$memoryInGB = [int64]$window.FindName('txtMemory').Text
$memory = $memoryInGB * 1GB
[int]$processors = [int]$window.FindName('txtProcessors').Text
$vmLocation = $window.FindName('txtVMLocation').Text
$logicalSectorObj = $window.FindName('cmbLogicalSectorSize').SelectedItem
$logicalSectorSize = [int]$logicalSectorObj.Content
# --- Windows Settings tab ---
$wrItem = $window.FindName('cmbWindowsRelease').SelectedItem $wrItem = $window.FindName('cmbWindowsRelease').SelectedItem
$windowsRelease = if ($wrItem -and $wrItem.Value) { $windowsRelease = if ($wrItem -and $wrItem.Value) { [int]$wrItem.Value } else { 10 }
[int]$wrItem.Value
} else {
10
}
$windowsVersion = $window.FindName('cmbWindowsVersion').SelectedItem $windowsVersion = $window.FindName('cmbWindowsVersion').SelectedItem
$windowsArch = $window.FindName('cmbWindowsArch').SelectedItem $windowsArch = $window.FindName('cmbWindowsArch').SelectedItem
$windowsLang = $window.FindName('cmbWindowsLang').SelectedItem $windowsLang = $window.FindName('cmbWindowsLang').SelectedItem
$windowsSKU = $window.FindName('cmbWindowsSKU').SelectedItem $windowsSKU = $window.FindName('cmbWindowsSKU').SelectedItem
$mediaType = $window.FindName('cmbMediaType').SelectedItem $mediaType = $window.FindName('cmbMediaType').SelectedItem
$optionalFeatures= $window.FindName('txtOptionalFeatures').Text
$productKey = $window.FindName('txtProductKey').Text $productKey = $window.FindName('txtProductKey').Text
$isoPath = $window.FindName('txtISOPath').Text $isoPath = $window.FindName('txtISOPath').Text
# Apps tab # --- M365 Apps/Office tab ---
$installApps = $window.FindName('chkInstallApps').IsChecked
# Office tab
$installOffice = $window.FindName('chkInstallOffice').IsChecked $installOffice = $window.FindName('chkInstallOffice').IsChecked
$officePath = $window.FindName('txtOfficePath').Text $officePath = $window.FindName('txtOfficePath').Text
$copyOfficeConfig = $window.FindName('chkCopyOfficeConfigXML').IsChecked $copyOfficeConfig = $window.FindName('chkCopyOfficeConfigXML').IsChecked
$officeConfigXMLFile = $window.FindName('txtOfficeConfigXMLFilePath').Text $officeConfigXMLFile = $window.FindName('txtOfficeConfigXMLFilePath').Text
# Drivers tab # --- Drivers tab ---
$installDrivers = $window.FindName('chkInstallDrivers').IsChecked $installDrivers = $window.FindName('chkInstallDrivers').IsChecked
$copyDrivers = $window.FindName('chkCopyDrivers').IsChecked $copyDrivers = $window.FindName('chkCopyDrivers').IsChecked
$downloadDrivers = $window.FindName('chkDownloadDrivers').IsChecked $downloadDrivers = $window.FindName('chkDownloadDrivers').IsChecked
@@ -164,98 +188,95 @@ function Get-UIConfig {
$peDriversFolder = $window.FindName('txtPEDriversFolder').Text $peDriversFolder = $window.FindName('txtPEDriversFolder').Text
$copyPEDrivers = $window.FindName('chkCopyPEDrivers').IsChecked $copyPEDrivers = $window.FindName('chkCopyPEDrivers').IsChecked
# Basic validations # --- Updates tab ---
if (-not $ffuDevPath) { $updateLatestCU = $window.FindName('chkUpdateLatestCU').IsChecked
throw "FFU Development Path is required." $updateLatestNet = $window.FindName('chkUpdateLatestNet').IsChecked
} $updateLatestDefender = $window.FindName('chkUpdateLatestDefender').IsChecked
if ($installDrivers -and (-not $driversFolder)) { $updateEdge = $window.FindName('chkUpdateEdge').IsChecked
throw "Drivers Folder is required when Install Drivers is checked." $updateOneDrive = $window.FindName('chkUpdateOneDrive').IsChecked
} $updateLatestMSRT = $window.FindName('chkUpdateLatestMSRT').IsChecked
if ($copyDrivers -and (-not $driversFolder)) { $updatePreviewCU = $window.FindName('chkUpdatePreviewCU').IsChecked
throw "Drivers Folder is required when Copy Drivers is checked."
}
if ($copyPEDrivers -and (-not $peDriversFolder)) {
throw "PE Drivers Folder is required when Copy PE Drivers is checked."
}
if ($downloadDrivers -and (-not $make)) {
throw "Make is required when Download Drivers is checked."
}
if ($downloadDrivers -and (-not $model)) {
throw "Model is required when Download Drivers is checked."
}
# If user picks 'Other' for VM Switch, use custom # --- Applications tab ---
$vmSwitchName = if ($vmSwitchSelected -eq 'Other') { $customVMSwitch } else { $vmSwitchSelected } $installApps = $window.FindName('chkInstallApps').IsChecked
# Build config # Build configuration hashtable (unsorted)
$config = [ordered]@{ $config = [ordered]@{
AppsPath = $AppsPath AllowExternalHardDiskMedia = $allowExt
CopyDrivers = $copyDrivers BuildUSBDrive = $buildUSB_USB
CopyPEDrivers = $copyPEDrivers CompactOS = $compactOS
CopyAutopilot = $copyAutopilot
CopyOfficeConfigXML = $copyOfficeConfig CopyOfficeConfigXML = $copyOfficeConfig
DriversFolder = $driversFolder CopyPEDrivers = $copyPEDrivers
CopyPPKG = $copyPPKG
CopyUnattend = $copyUnattend
CreateCaptureMedia = $createCapture
CreateDeploymentMedia = $createDeployMedia
CleanupAppsISO = $window.FindName('chkCleanupAppsISO').IsChecked
CleanupCaptureISO = $window.FindName('chkCleanupCaptureISO').IsChecked
CleanupDeployISO = $window.FindName('chkCleanupDeployISO').IsChecked
CleanupDrivers = $window.FindName('chkCleanupDrivers').IsChecked
Disksize = $diskSize
DownloadDrivers = $downloadDrivers DownloadDrivers = $downloadDrivers
EnablePromptExternalHardDiskMedia = $promptExt
FFUCaptureLocation = $ffuCaptureLocation
FFUDevelopmentPath = $ffuDevPath FFUDevelopmentPath = $ffuDevPath
FFUName = $ffuName
InstallApps = $installApps
InstallDrivers = $installDrivers
InstallOffice = $installOffice
ISOPath = $isoPath
Make = if ($downloadDrivers) { $make } else { $null }
MediaType = $mediaType MediaType = $mediaType
Model = if ($downloadDrivers) { $model } else { $null } Make = $make
OfficeConfigXMLFile = if ($installOffice -and $copyOfficeConfig) { $officeConfigXMLFile } else { $null } Model = $model
OfficeConfigXMLFile = $officeConfigXMLFile
OfficePath = $officePath OfficePath = $officePath
OptionalFeatures = $optionalFeatures OptionalFeatures = $window.FindName('txtOptionalFeatures').Text
PEDriversFolder = $peDriversFolder PEDriversFolder = $peDriversFolder
ProductKey = $productKey ProductKey = $productKey
Processors = $processors
RemoveFFU = $window.FindName('chkRemoveFFU').IsChecked
UpdateEdge = $updateEdge
UpdateLatestCU = $updateLatestCU
UpdateLatestDefender = $updateLatestDefender
UpdateLatestMSRT = $updateLatestMSRT
UpdateLatestNet = $updateLatestNet
UpdateOneDrive = $updateOneDrive
UpdatePreviewCU = $updatePreviewCU
VMHostIPAddress = $vmHostIPAddress VMHostIPAddress = $vmHostIPAddress
VMLocation = $vmLocation
VMSwitchName = $vmSwitchName VMSwitchName = $vmSwitchName
LogicalSectorSizeBytes = $logicalSectorSize
Memory = $memory
WindowsArch = $windowsArch WindowsArch = $windowsArch
WindowsLang = $windowsLang WindowsLang = $windowsLang
WindowsRelease = $windowsRelease WindowsRelease = $windowsRelease
WindowsSKU = $windowsSKU WindowsSKU = $windowsSKU
WindowsVersion = $windowsVersion WindowsVersion = $windowsVersion
} }
return $config
# Sort the configuration hashtable alphabetically by key
$sortedConfig = [ordered]@{}
foreach ($key in ($config.Keys | Sort-Object)) {
$sortedConfig[$key] = $config[$key]
}
return $sortedConfig
} }
function UpdateWindowsReleaseList { function UpdateWindowsReleaseList {
param([string]$isoPath) param([string]$isoPath)
if (-not $script:cmbWindowsRelease) { return } if (-not $script:cmbWindowsRelease) { return }
$oldItem = $script:cmbWindowsRelease.SelectedItem $oldItem = $script:cmbWindowsRelease.SelectedItem
$script:cmbWindowsRelease.Items.Clear() $script:cmbWindowsRelease.Items.Clear()
$script:cmbWindowsRelease.DisplayMemberPath = 'Display' $script:cmbWindowsRelease.DisplayMemberPath = 'Display'
$script:cmbWindowsRelease.SelectedValuePath = 'Value' $script:cmbWindowsRelease.SelectedValuePath = 'Value'
if ([string]::IsNullOrEmpty($isoPath)) { if ([string]::IsNullOrEmpty($isoPath)) {
# Only MCT foreach ($rel in $mctWindowsReleases) { $script:cmbWindowsRelease.Items.Add($rel) | Out-Null }
foreach ($rel in $mctWindowsReleases) {
$script:cmbWindowsRelease.Items.Add($rel) | Out-Null
}
} }
else { else {
# Full list foreach ($rel in $allWindowsReleases) { $script:cmbWindowsRelease.Items.Add($rel) | Out-Null }
foreach ($rel in $allWindowsReleases) {
$script:cmbWindowsRelease.Items.Add($rel) | Out-Null
} }
}
if ($oldItem) { if ($oldItem) {
$reSelect = $script:cmbWindowsRelease.Items | Where-Object { $_.Value -eq $oldItem.Value } $reSelect = $script:cmbWindowsRelease.Items | Where-Object { $_.Value -eq $oldItem.Value }
if ($reSelect) { if ($reSelect) { $script:cmbWindowsRelease.SelectedItem = $reSelect }
$script:cmbWindowsRelease.SelectedItem = $reSelect else { $script:cmbWindowsRelease.SelectedIndex = 0 }
}
else {
$script:cmbWindowsRelease.SelectedIndex = 0
}
}
else {
$script:cmbWindowsRelease.SelectedIndex = 0
} }
else { $script:cmbWindowsRelease.SelectedIndex = 0 }
} }
function UpdateWindowsVersionCombo { function UpdateWindowsVersionCombo {
@@ -265,18 +286,13 @@ function UpdateWindowsVersionCombo {
) )
$combo = $window.FindName('cmbWindowsVersion') $combo = $window.FindName('cmbWindowsVersion')
if (-not $combo) { return } if (-not $combo) { return }
$combo.Items.Clear() $combo.Items.Clear()
if (-not $windowsVersionMap.ContainsKey($selectedRelease)) { if (-not $windowsVersionMap.ContainsKey($selectedRelease)) {
$combo.IsEnabled = $false $combo.IsEnabled = $false
return return
} }
$validVersions = $windowsVersionMap[$selectedRelease] $validVersions = $windowsVersionMap[$selectedRelease]
if ([string]::IsNullOrEmpty($isoPath)) { if ([string]::IsNullOrEmpty($isoPath)) {
# MCT usage => locked & pick default
switch ($selectedRelease) { switch ($selectedRelease) {
10 { $default = "22H2" } 10 { $default = "22H2" }
11 { $default = "24H2" } 11 { $default = "24H2" }
@@ -291,35 +307,19 @@ function UpdateWindowsVersionCombo {
$combo.IsEnabled = $false $combo.IsEnabled = $false
} }
else { else {
# ISO => user can choose foreach ($v in $validVersions) { [void]$combo.Items.Add($v) }
foreach ($v in $validVersions) { if ($selectedRelease -eq 11 -and $validVersions -contains "24H2") { $combo.SelectedItem = "24H2" }
[void]$combo.Items.Add($v) else { $combo.SelectedIndex = 0 }
}
# If Windows 11 => default to 24H2 if available
if ($selectedRelease -eq 11 -and $validVersions -contains "24H2") {
$combo.SelectedItem = "24H2"
}
else {
$combo.SelectedIndex = 0
}
$combo.IsEnabled = $true $combo.IsEnabled = $true
} }
} }
$script:RefreshWindowsUI = { $script:RefreshWindowsUI = {
param([string]$isoPath) param([string]$isoPath)
UpdateWindowsReleaseList -isoPath $isoPath UpdateWindowsReleaseList -isoPath $isoPath
$selItem = $script:cmbWindowsRelease.SelectedItem $selItem = $script:cmbWindowsRelease.SelectedItem
if ($selItem -and $selItem.Value -is [int]) { if ($selItem -and $selItem.Value -is [int]) { $selectedRelease = [int]$selItem.Value }
$selectedRelease = [int]$selItem.Value else { $selectedRelease = 10 }
}
else {
$selectedRelease = 10
}
UpdateWindowsVersionCombo -selectedRelease $selectedRelease -isoPath $isoPath UpdateWindowsVersionCombo -selectedRelease $selectedRelease -isoPath $isoPath
} }
@@ -339,143 +339,125 @@ $xmlReader = [System.Xml.XmlReader]::Create($reader)
$window = [Windows.Markup.XamlReader]::Load($xmlReader) $window = [Windows.Markup.XamlReader]::Load($xmlReader)
# Assign images # Assign images
foreach ($imgName in $imageNames) { foreach ($imgName in $imageNames) { Set-ImageSource -window $window -imageName $imgName -sourcePath $infoImagePath }
Set-ImageSource -window $window -imageName $imgName -sourcePath $infoImagePath
}
# We'll store dynamic checkboxes for each optional feature # Dynamic checkboxes for optional features in Windows Settings tab
$script:featureCheckBoxes = @{} $script:featureCheckBoxes = @{}
function UpdateOptionalFeaturesString { function UpdateOptionalFeaturesString {
# Collect all features that are checked
$checkedFeatures = @() $checkedFeatures = @()
foreach ($entry in $script:featureCheckBoxes.GetEnumerator()) { foreach ($entry in $script:featureCheckBoxes.GetEnumerator()) {
if ($entry.Value.IsChecked) { if ($entry.Value.IsChecked) { $checkedFeatures += $entry.Key }
$checkedFeatures += $entry.Key
} }
$window.FindName('txtOptionalFeatures').Text = $checkedFeatures -join ";"
} }
$script:txtOptionalFeatures.Text = $checkedFeatures -join ";"
}
# Create the dynamic multi-column grid of feature checkboxes
function BuildFeaturesGrid { function BuildFeaturesGrid {
param ( param (
[System.Windows.FrameworkElement]$parent [System.Windows.FrameworkElement]$parent
) )
$parent.Children.Clear() $parent.Children.Clear()
$sortedFeatures = $allowedFeatures | Sort-Object $sortedFeatures = $allowedFeatures | Sort-Object
# Now 10 features per column
$rows = 10 $rows = 10
$columns = [math]::Ceiling($sortedFeatures.Count / $rows) $columns = [math]::Ceiling($sortedFeatures.Count / $rows)
$featuresGrid = New-Object System.Windows.Controls.Grid $featuresGrid = New-Object System.Windows.Controls.Grid
$featuresGrid.Margin = "0,5,0,5" $featuresGrid.Margin = "0,5,0,5"
$featuresGrid.ShowGridLines = $false $featuresGrid.ShowGridLines = $false
# Define rows
for ($r = 0; $r -lt $rows; $r++) { for ($r = 0; $r -lt $rows; $r++) {
$rowDef = New-Object System.Windows.Controls.RowDefinition $rowDef = New-Object System.Windows.Controls.RowDefinition
$rowDef.Height = 'Auto' $rowDef.Height = 'Auto'
$featuresGrid.RowDefinitions.Add($rowDef) | Out-Null $featuresGrid.RowDefinitions.Add($rowDef) | Out-Null
} }
# Define columns
for ($c = 0; $c -lt $columns; $c++) { for ($c = 0; $c -lt $columns; $c++) {
$colDef = New-Object System.Windows.Controls.ColumnDefinition $colDef = New-Object System.Windows.Controls.ColumnDefinition
$colDef.Width = 'Auto' $colDef.Width = 'Auto'
$featuresGrid.ColumnDefinitions.Add($colDef) | Out-Null $featuresGrid.ColumnDefinitions.Add($colDef) | Out-Null
} }
for ($i = 0; $i -lt $sortedFeatures.Count; $i++) { for ($i = 0; $i -lt $sortedFeatures.Count; $i++) {
$featureName = $sortedFeatures[$i] $featureName = $sortedFeatures[$i]
$colIndex = [int]([math]::Floor($i / $rows)) $colIndex = [int]([math]::Floor($i / $rows))
$rowIndex = $i % $rows $rowIndex = $i % $rows
$chk = New-Object System.Windows.Controls.CheckBox $chk = New-Object System.Windows.Controls.CheckBox
$chk.Content = $featureName $chk.Content = $featureName
$chk.Margin = '5,2,15,2' $chk.Margin = "5"
$chk.Add_Checked({ $chk.Add_Checked({ UpdateOptionalFeaturesString })
UpdateOptionalFeaturesString $chk.Add_Unchecked({ UpdateOptionalFeaturesString })
})
$chk.Add_Unchecked({
UpdateOptionalFeaturesString
})
$script:featureCheckBoxes[$featureName] = $chk $script:featureCheckBoxes[$featureName] = $chk
[System.Windows.Controls.Grid]::SetRow($chk, $rowIndex) [System.Windows.Controls.Grid]::SetRow($chk, $rowIndex)
[System.Windows.Controls.Grid]::SetColumn($chk, $colIndex) [System.Windows.Controls.Grid]::SetColumn($chk, $colIndex)
$featuresGrid.Children.Add($chk) | Out-Null $featuresGrid.Children.Add($chk) | Out-Null
} }
$parent.Children.Add($featuresGrid) | Out-Null $parent.Children.Add($featuresGrid) | Out-Null
} }
# Window Loaded # Variables for managing forced Install Apps state due to Updates
$script:installAppsForcedByUpdates = $false
$script:prevInstallAppsStateBeforeUpdates = $null
# Define the function in script scope to update Install Apps based on Updates tab
$script:UpdateInstallAppsBasedOnUpdates = {
$anyUpdateChecked = $window.FindName('chkUpdateLatestDefender').IsChecked -or $window.FindName('chkUpdateEdge').IsChecked -or $window.FindName('chkUpdateOneDrive').IsChecked -or $window.FindName('chkUpdateLatestMSRT').IsChecked
if ($anyUpdateChecked) {
if (-not $script:installAppsForcedByUpdates) {
$script:prevInstallAppsStateBeforeUpdates = $window.FindName('chkInstallApps').IsChecked
$script:installAppsForcedByUpdates = $true
}
$window.FindName('chkInstallApps').IsChecked = $true
$window.FindName('chkInstallApps').IsEnabled = $false
} else {
if ($script:installAppsForcedByUpdates) {
$window.FindName('chkInstallApps').IsChecked = $script:prevInstallAppsStateBeforeUpdates
$script:installAppsForcedByUpdates = $false
$script:prevInstallAppsStateBeforeUpdates = $null
}
$window.FindName('chkInstallApps').IsEnabled = $true
}
}
$window.Add_Loaded({ $window.Add_Loaded({
$script:cmbWindowsRelease = $window.FindName('cmbWindowsRelease') $script:cmbWindowsRelease = $window.FindName('cmbWindowsRelease')
$script:cmbWindowsVersion = $window.FindName('cmbWindowsVersion') $script:cmbWindowsVersion = $window.FindName('cmbWindowsVersion')
$script:txtISOPath = $window.FindName('txtISOPath') $script:txtISOPath = $window.FindName('txtISOPath')
& $script:RefreshWindowsUI($defaultISOPath) & $script:RefreshWindowsUI($defaultISOPath)
$script:txtISOPath.Add_TextChanged({ & $script:RefreshWindowsUI($script:txtISOPath.Text) })
# ISO path changed
$script:txtISOPath.Add_TextChanged({
& $script:RefreshWindowsUI($script:txtISOPath.Text)
})
# Windows release changed
$script:cmbWindowsRelease.Add_SelectionChanged({ $script:cmbWindowsRelease.Add_SelectionChanged({
$selItem = $script:cmbWindowsRelease.SelectedItem $selItem = $script:cmbWindowsRelease.SelectedItem
if ($selItem -and $selItem.Value) { if ($selItem -and $selItem.Value) { UpdateWindowsVersionCombo -selectedRelease $selItem.Value -isoPath $script:txtISOPath.Text }
UpdateWindowsVersionCombo -selectedRelease $selItem.Value -isoPath $script:txtISOPath.Text
}
}) })
# Browse ISO
$script:btnBrowseISO = $window.FindName('btnBrowseISO') $script:btnBrowseISO = $window.FindName('btnBrowseISO')
$script:btnBrowseISO.Add_Click({ $script:btnBrowseISO.Add_Click({
$ofd = New-Object System.Windows.Forms.OpenFileDialog $ofd = New-Object System.Windows.Forms.OpenFileDialog
$ofd.Filter = "ISO files (*.iso)|*.iso" $ofd.Filter = "ISO files (*.iso)|*.iso"
$ofd.Title = "Select Windows ISO File" $ofd.Title = "Select Windows ISO File"
if ($ofd.ShowDialog() -eq [System.Windows.Forms.DialogResult]::OK) { if ($ofd.ShowDialog() -eq [System.Windows.Forms.DialogResult]::OK) { $script:txtISOPath.Text = $ofd.FileName }
$script:txtISOPath.Text = $ofd.FileName
}
}) })
# Home tab (renamed from Basic) displays static welcome text.
# Basic defaults # Build tab defaults
$window.FindName('txtFFUDevPath').Text = $FFUDevelopmentPath $window.FindName('txtFFUDevPath').Text = $FFUDevelopmentPath
$window.FindName('txtFFUName').Text = "{WindowsRelease}_{WindowsVersion}_{SKU}_{yyyy}-{MM}-{dd}_{HH}{mm}" $window.FindName('txtCustomFFUNameTemplate').Text = "{WindowsRelease}_{WindowsVersion}_{SKU}_{yyyy}-{MM}-{dd}_{HH}{mm}"
$window.FindName('txtFFUCaptureLocation').Text = (Join-Path $FFUDevelopmentPath "FFU")
# VM Switch detection $window.FindName('txtShareName').Text = "FFUCaptureShare"
$window.FindName('txtUsername').Text = "ffu_user"
# Set VM Location default to $FFUDevelopmentPath\VM
$window.FindName('txtVMLocation').Text = (Join-Path $FFUDevelopmentPath "VM")
# Hyper-V Settings: Populate defaults (Share Name and Username now on Build, so only populate remaining fields)
$script:vmSwitchMap = @{} $script:vmSwitchMap = @{}
$script:allSwitches = Get-VMSwitch -ErrorAction SilentlyContinue $script:allSwitches = Get-VMSwitch -ErrorAction SilentlyContinue
$script:cmbVMSwitchName = $window.FindName('cmbVMSwitchName') $script:cmbVMSwitchName = $window.FindName('cmbVMSwitchName')
foreach ($sw in $script:allSwitches) { foreach ($sw in $script:allSwitches) {
$script:cmbVMSwitchName.Items.Add($sw.Name) | Out-Null $script:cmbVMSwitchName.Items.Add($sw.Name) | Out-Null
$na = Get-NetAdapter -ErrorAction SilentlyContinue | Where-Object { $_.Name -like "*($($sw.Name))*" } $na = Get-NetAdapter -ErrorAction SilentlyContinue | Where-Object { $_.Name -like "*($($sw.Name))*" }
if ($na) { if ($na) {
$netIPs = Get-NetIPAddress -InterfaceIndex $na.ifIndex -AddressFamily IPv4 -ErrorAction SilentlyContinue $netIPs = Get-NetIPAddress -InterfaceIndex $na.ifIndex -AddressFamily IPv4 -ErrorAction SilentlyContinue
$validIPs = $netIPs | Where-Object { $_.IPAddress -notlike '169.254.*' -and $_.IPAddress } $validIPs = $netIPs | Where-Object { $_.IPAddress -notlike '169.254.*' -and $_.IPAddress }
if ($validIPs) { if ($validIPs) { $script:vmSwitchMap[$sw.Name] = ($validIPs | Select-Object -First 1).IPAddress }
$script:vmSwitchMap[$sw.Name] = ($validIPs | Select-Object -First 1).IPAddress
}
} }
} }
$script:cmbVMSwitchName.Items.Add('Other') | Out-Null $script:cmbVMSwitchName.Items.Add('Other') | Out-Null
if ($script:cmbVMSwitchName.Items.Count -gt 0) { if ($script:cmbVMSwitchName.Items.Count -gt 0) {
if ($script:allSwitches.Count -gt 0) { if ($script:allSwitches.Count -gt 0) {
$script:cmbVMSwitchName.SelectedIndex = 0 $script:cmbVMSwitchName.SelectedIndex = 0
$first = $script:cmbVMSwitchName.SelectedItem $first = $script:cmbVMSwitchName.SelectedItem
if ($script:vmSwitchMap.ContainsKey($first)) { if ($script:vmSwitchMap.ContainsKey($first)) { $window.FindName('txtVMHostIPAddress').Text = $script:vmSwitchMap[$first] }
$window.FindName('txtVMHostIPAddress').Text = $script:vmSwitchMap[$first] else { $window.FindName('txtVMHostIPAddress').Text = '' }
}
else {
$window.FindName('txtVMHostIPAddress').Text = ''
}
} }
else { else {
$script:cmbVMSwitchName.SelectedItem = 'Other' $script:cmbVMSwitchName.SelectedItem = 'Other'
@@ -490,20 +472,14 @@ $window.Add_Loaded({
else { else {
$window.FindName('txtCustomVMSwitchName').Visibility = 'Collapsed' $window.FindName('txtCustomVMSwitchName').Visibility = 'Collapsed'
$sel = $_.AddedItems[0] $sel = $_.AddedItems[0]
if ($script:vmSwitchMap.ContainsKey($sel)) { if ($script:vmSwitchMap.ContainsKey($sel)) { $window.FindName('txtVMHostIPAddress').Text = $script:vmSwitchMap[$sel] }
$window.FindName('txtVMHostIPAddress').Text = $script:vmSwitchMap[$sel] else { $window.FindName('txtVMHostIPAddress').Text = '' }
}
else {
$window.FindName('txtVMHostIPAddress').Text = ''
}
} }
}) })
# Windows Arch, Lang, SKU, etc. # Windows Arch, Lang, SKU, etc.
$script:cmbWindowsArch = $window.FindName('cmbWindowsArch') $script:cmbWindowsArch = $window.FindName('cmbWindowsArch')
foreach ($a in 'x86','x64','arm64') { [void]$script:cmbWindowsArch.Items.Add($a) } foreach ($a in 'x86','x64','arm64') { [void]$script:cmbWindowsArch.Items.Add($a) }
$script:cmbWindowsArch.SelectedItem = $defaultWindowsArch $script:cmbWindowsArch.SelectedItem = $defaultWindowsArch
$script:cmbWindowsLang = $window.FindName('cmbWindowsLang') $script:cmbWindowsLang = $window.FindName('cmbWindowsLang')
$allowedLangs = @( $allowedLangs = @(
'ar-sa','bg-bg','cs-cz','da-dk','de-de','el-gr','en-gb','en-us','es-es','es-mx','et-ee', 'ar-sa','bg-bg','cs-cz','da-dk','de-de','el-gr','en-gb','en-us','es-es','es-mx','et-ee',
@@ -511,38 +487,26 @@ $window.Add_Loaded({
'nb-no','nl-nl','pl-pl','pt-br','pt-pt','ro-ro','ru-ru','sk-sk','sl-si','sr-latn-rs', 'nb-no','nl-nl','pl-pl','pt-br','pt-pt','ro-ro','ru-ru','sk-sk','sl-si','sr-latn-rs',
'sv-se','th-th','tr-tr','uk-ua','zh-cn','zh-tw' 'sv-se','th-th','tr-tr','uk-ua','zh-cn','zh-tw'
) )
foreach ($lang in $allowedLangs) { foreach ($lang in $allowedLangs) { [void]$script:cmbWindowsLang.Items.Add($lang) }
[void]$script:cmbWindowsLang.Items.Add($lang)
}
$script:cmbWindowsLang.SelectedItem = $defaultWindowsLang $script:cmbWindowsLang.SelectedItem = $defaultWindowsLang
$script:cmbWindowsSKU = $window.FindName('cmbWindowsSKU') $script:cmbWindowsSKU = $window.FindName('cmbWindowsSKU')
$script:cmbWindowsSKU.Items.Clear() $script:cmbWindowsSKU.Items.Clear()
foreach ($sku in $skuList) { foreach ($sku in $skuList) { [void]$script:cmbWindowsSKU.Items.Add($sku) }
[void]$script:cmbWindowsSKU.Items.Add($sku)
}
$script:cmbWindowsSKU.SelectedItem = $defaultWindowsSKU $script:cmbWindowsSKU.SelectedItem = $defaultWindowsSKU
$script:cmbMediaType = $window.FindName('cmbMediaType') $script:cmbMediaType = $window.FindName('cmbMediaType')
foreach ($mt in 'consumer','business') { foreach ($mt in 'consumer','business') { [void]$script:cmbMediaType.Items.Add($mt) }
[void]$script:cmbMediaType.Items.Add($mt)
}
$script:cmbMediaType.SelectedItem = $defaultMediaType $script:cmbMediaType.SelectedItem = $defaultMediaType
$script:txtOptionalFeatures = $window.FindName('txtOptionalFeatures') $script:txtOptionalFeatures = $window.FindName('txtOptionalFeatures')
$script:txtOptionalFeatures.Text = $defaultOptionalFeatures $script:txtOptionalFeatures.Text = $defaultOptionalFeatures
$window.FindName('txtProductKey').Text = $defaultProductKey $window.FindName('txtProductKey').Text = $defaultProductKey
# Drivers tab # Drivers tab
$script:chkDownloadDrivers = $window.FindName('chkDownloadDrivers') $script:chkDownloadDrivers = $window.FindName('chkDownloadDrivers')
$script:cmbMake = $window.FindName('cmbMake') $script:cmbMake = $window.FindName('cmbMake')
$script:cmbModel = $window.FindName('cmbModel') $script:cmbModel = $window.FindName('cmbModel')
$script:spMakeModelSection = $window.FindName('spMakeModelSection') $script:spMakeModelSection = $window.FindName('spMakeModelSection')
$makeList = @('Microsoft','Dell','HP','Lenovo') $makeList = @('Microsoft','Dell','HP','Lenovo')
foreach ($m in $makeList) { [void]$script:cmbMake.Items.Add($m) } foreach ($m in $makeList) { [void]$script:cmbMake.Items.Add($m) }
if ($script:cmbMake.Items.Count -gt 0) { $script:cmbMake.SelectedIndex = 0 } if ($script:cmbMake.Items.Count -gt 0) { $script:cmbMake.SelectedIndex = 0 }
$script:chkDownloadDrivers.Add_Checked({ $script:chkDownloadDrivers.Add_Checked({
$script:cmbMake.Visibility = 'Visible' $script:cmbMake.Visibility = 'Visible'
$script:cmbModel.Visibility = 'Visible' $script:cmbModel.Visibility = 'Visible'
@@ -553,19 +517,16 @@ $window.Add_Loaded({
$script:cmbModel.Visibility = 'Collapsed' $script:cmbModel.Visibility = 'Collapsed'
$script:spMakeModelSection.Visibility = 'Collapsed' $script:spMakeModelSection.Visibility = 'Collapsed'
}) })
# Office interplay # Office interplay
$script:chkInstallOffice = $window.FindName('chkInstallOffice') $script:chkInstallOffice = $window.FindName('chkInstallOffice')
$script:chkInstallApps = $window.FindName('chkInstallApps') $script:chkInstallApps = $window.FindName('chkInstallApps')
$script:installAppsCheckedByOffice = $false $script:installAppsCheckedByOffice = $false
$script:OfficePathStackPanel = $window.FindName('OfficePathStackPanel') $script:OfficePathStackPanel = $window.FindName('OfficePathStackPanel')
$script:OfficePathGrid = $window.FindName('OfficePathGrid') $script:OfficePathGrid = $window.FindName('OfficePathGrid')
$script:CopyOfficeConfigXMLStackPanel = $window.FindName('CopyOfficeConfigXMLStackPanel') $script:CopyOfficeConfigXMLStackPanel = $window.FindName('CopyOfficeConfigXMLStackPanel')
$script:OfficeConfigurationXMLFileStackPanel = $window.FindName('OfficeConfigurationXMLFileStackPanel') $script:OfficeConfigurationXMLFileStackPanel = $window.FindName('OfficeConfigurationXMLFileStackPanel')
$script:OfficeConfigurationXMLFileGrid = $window.FindName('OfficeConfigurationXMLFileGrid') $script:OfficeConfigurationXMLFileGrid = $window.FindName('OfficeConfigurationXMLFileGrid')
$script:chkCopyOfficeConfigXML = $window.FindName('chkCopyOfficeConfigXML') $script:chkCopyOfficeConfigXML = $window.FindName('chkCopyOfficeConfigXML')
if ($script:chkInstallOffice.IsChecked) { if ($script:chkInstallOffice.IsChecked) {
$script:OfficePathStackPanel.Visibility = 'Visible' $script:OfficePathStackPanel.Visibility = 'Visible'
$script:OfficePathGrid.Visibility = 'Visible' $script:OfficePathGrid.Visibility = 'Visible'
@@ -578,7 +539,6 @@ $window.Add_Loaded({
$script:OfficeConfigurationXMLFileStackPanel.Visibility = 'Collapsed' $script:OfficeConfigurationXMLFileStackPanel.Visibility = 'Collapsed'
$script:OfficeConfigurationXMLFileGrid.Visibility = 'Collapsed' $script:OfficeConfigurationXMLFileGrid.Visibility = 'Collapsed'
} }
$script:chkInstallOffice.Add_Checked({ $script:chkInstallOffice.Add_Checked({
if (-not $script:chkInstallApps.IsChecked) { if (-not $script:chkInstallApps.IsChecked) {
$script:chkInstallApps.IsChecked = $true $script:chkInstallApps.IsChecked = $true
@@ -601,7 +561,6 @@ $window.Add_Loaded({
$script:OfficeConfigurationXMLFileStackPanel.Visibility = 'Collapsed' $script:OfficeConfigurationXMLFileStackPanel.Visibility = 'Collapsed'
$script:OfficeConfigurationXMLFileGrid.Visibility = 'Collapsed' $script:OfficeConfigurationXMLFileGrid.Visibility = 'Collapsed'
}) })
$script:chkCopyOfficeConfigXML.Add_Checked({ $script:chkCopyOfficeConfigXML.Add_Checked({
$script:OfficeConfigurationXMLFileStackPanel.Visibility = 'Visible' $script:OfficeConfigurationXMLFileStackPanel.Visibility = 'Visible'
$script:OfficeConfigurationXMLFileGrid.Visibility = 'Visible' $script:OfficeConfigurationXMLFileGrid.Visibility = 'Visible'
@@ -610,11 +569,30 @@ $window.Add_Loaded({
$script:OfficeConfigurationXMLFileStackPanel.Visibility = 'Collapsed' $script:OfficeConfigurationXMLFileStackPanel.Visibility = 'Collapsed'
$script:OfficeConfigurationXMLFileGrid.Visibility = 'Collapsed' $script:OfficeConfigurationXMLFileGrid.Visibility = 'Collapsed'
}) })
# Build dynamic multi-column checkboxes for optional features in Windows Settings tab
# Build the dynamic multi-column checkboxes inside the Expander content
$script:featuresPanel = $window.FindName('stackFeaturesContainer') $script:featuresPanel = $window.FindName('stackFeaturesContainer')
if ($script:featuresPanel) { if ($script:featuresPanel) { BuildFeaturesGrid -parent $script:featuresPanel }
BuildFeaturesGrid -parent $script:featuresPanel # Variables for managing forced Install Apps state due to Updates
$script:installAppsForcedByUpdates = $false
$script:prevInstallAppsStateBeforeUpdates = $null
# Define the function in script scope to update Install Apps based on Updates tab
$script:UpdateInstallAppsBasedOnUpdates = {
$anyUpdateChecked = $window.FindName('chkUpdateLatestDefender').IsChecked -or $window.FindName('chkUpdateEdge').IsChecked -or $window.FindName('chkUpdateOneDrive').IsChecked -or $window.FindName('chkUpdateLatestMSRT').IsChecked
if ($anyUpdateChecked) {
if (-not $script:installAppsForcedByUpdates) {
$script:prevInstallAppsStateBeforeUpdates = $window.FindName('chkInstallApps').IsChecked
$script:installAppsForcedByUpdates = $true
}
$window.FindName('chkInstallApps').IsChecked = $true
$window.FindName('chkInstallApps').IsEnabled = $false
} else {
if ($script:installAppsForcedByUpdates) {
$window.FindName('chkInstallApps').IsChecked = $script:prevInstallAppsStateBeforeUpdates
$script:installAppsForcedByUpdates = $false
$script:prevInstallAppsStateBeforeUpdates = $null
}
$window.FindName('chkInstallApps').IsEnabled = $true
}
} }
}) })
@@ -626,19 +604,15 @@ $btnRun.Add_Click({
$txtStatus = $window.FindName('txtStatus') $txtStatus = $window.FindName('txtStatus')
$progressBar.Visibility = 'Visible' $progressBar.Visibility = 'Visible'
$txtStatus.Text = "Starting FFU build..." $txtStatus.Text = "Starting FFU build..."
$config = Get-UIConfig $config = Get-UIConfig
$configFilePath = Join-Path $config.FFUDevelopmentPath "FFUConfig.json" $configFilePath = Join-Path $config.FFUDevelopmentPath "FFUConfig.json"
$config | ConvertTo-Json -Depth 10 | Set-Content $configFilePath -Encoding UTF8 $config | ConvertTo-Json -Depth 10 | Set-Content $configFilePath -Encoding UTF8
$txtStatus.Text = "Executing BuildFFUVM script with config file..." $txtStatus.Text = "Executing BuildFFUVM script with config file..."
& "$PSScriptRoot\BuildFFUVM.ps1" -ConfigFile $configFilePath -Verbose & "$PSScriptRoot\BuildFFUVM.ps1" -ConfigFile $configFilePath -Verbose
if ($config.InstallOffice -and $config.OfficeConfigXMLFile) { if ($config.InstallOffice -and $config.OfficeConfigXMLFile) {
Copy-Item -Path $config.OfficeConfigXMLFile -Destination $config.OfficePath -Force Copy-Item -Path $config.OfficeConfigXMLFile -Destination $config.OfficePath -Force
$txtStatus.Text = "Office Configuration XML file copied successfully." $txtStatus.Text = "Office Configuration XML file copied successfully."
} }
$txtStatus.Text = "FFU build completed successfully." $txtStatus.Text = "FFU build completed successfully."
} }
catch { catch {
@@ -655,28 +629,19 @@ $btnBuildConfig = $window.FindName('btnBuildConfig')
$btnBuildConfig.Add_Click({ $btnBuildConfig.Add_Click({
try { try {
$config = Get-UIConfig $config = Get-UIConfig
$defaultConfigPath = Join-Path $config.FFUDevelopmentPath "config" $defaultConfigPath = Join-Path $config.FFUDevelopmentPath "config"
if (-not (Test-Path $defaultConfigPath)) { if (-not (Test-Path $defaultConfigPath)) {
New-Item -Path $defaultConfigPath -ItemType Directory -Force | Out-Null New-Item -Path $defaultConfigPath -ItemType Directory -Force | Out-Null
} }
$sfd = New-Object System.Windows.Forms.SaveFileDialog $sfd = New-Object System.Windows.Forms.SaveFileDialog
$sfd.Filter = "JSON files (*.json)|*.json|All files (*.*)|*.*" $sfd.Filter = "JSON files (*.json)|*.json|All files (*.*)|*.*"
$sfd.Title = "Save Configuration File" $sfd.Title = "Save Configuration File"
$sfd.InitialDirectory = $defaultConfigPath $sfd.InitialDirectory = $defaultConfigPath
$sfd.FileName = "FFUConfig.json" $sfd.FileName = "FFUConfig.json"
if ($sfd.ShowDialog() -eq [System.Windows.Forms.DialogResult]::OK) { if ($sfd.ShowDialog() -eq [System.Windows.Forms.DialogResult]::OK) {
$savePath = $sfd.FileName $savePath = $sfd.FileName
$config | ConvertTo-Json -Depth 10 | Set-Content $savePath -Encoding UTF8 $config | ConvertTo-Json -Depth 10 | Set-Content $savePath -Encoding UTF8
[System.Windows.MessageBox]::Show("Configuration file saved to:`n$savePath", "Success", "OK", "Information")
[System.Windows.MessageBox]::Show(
"Configuration file saved to:`n$savePath",
"Success",
"OK",
"Information"
)
} }
} }
catch { catch {
@@ -684,4 +649,84 @@ $btnBuildConfig.Add_Click({
} }
}) })
# Button: Load Config File
$btnLoadConfig = $window.FindName('btnLoadConfig')
$btnLoadConfig.Add_Click({
try {
$ofd = New-Object System.Windows.Forms.OpenFileDialog
$ofd.Filter = "JSON files (*.json)|*.json|All files (*.*)|*.*"
$ofd.Title = "Load Configuration File"
if ($ofd.ShowDialog() -eq [System.Windows.Forms.DialogResult]::OK) {
$configContent = Get-Content -Path $ofd.FileName -Raw | ConvertFrom-Json
# Update Build tab values
$window.FindName('txtFFUDevPath').Text = $configContent.FFUDevelopmentPath
$window.FindName('txtCustomFFUNameTemplate').Text = $configContent.CustomFFUNameTemplate
$window.FindName('txtFFUCaptureLocation').Text = $configContent.FFUCaptureLocation
$window.FindName('txtShareName').Text = $configContent.ShareName
$window.FindName('txtUsername').Text = $configContent.Username
$window.FindName('chkBuildUSBDrive').IsChecked = $configContent.BuildUSBDrive
$window.FindName('chkCompactOS').IsChecked = $configContent.CompactOS
$window.FindName('chkOptimize').IsChecked = $configContent.Optimize
$window.FindName('chkPromptExternalHardDiskMedia').IsChecked = $configContent.EnablePromptExternalHardDiskMedia
$window.FindName('chkAllowExternalHardDiskMedia').IsChecked = $configContent.AllowExternalHardDiskMedia
$window.FindName('chkCreateCaptureMedia').IsChecked = $configContent.CreateCaptureMedia
$window.FindName('chkCreateDeploymentMedia').IsChecked = $configContent.CreateDeploymentMedia
# Post Build Cleanup group
$window.FindName('chkCleanupAppsISO').IsChecked = $configContent.CleanupAppsISO
$window.FindName('chkCleanupCaptureISO').IsChecked = $configContent.CleanupCaptureISO
$window.FindName('chkCleanupDeployISO').IsChecked = $configContent.CleanupDeployISO
$window.FindName('chkCleanupDrivers').IsChecked = $configContent.CleanupDrivers
$window.FindName('chkRemoveFFU').IsChecked = $configContent.RemoveFFU
# USB Drive Modification group (now in Build USB Drive section)
$window.FindName('chkCopyAutopilot').IsChecked = $configContent.CopyAutopilot
$window.FindName('chkCopyUnattend').IsChecked = $configContent.CopyUnattend
$window.FindName('chkCopyPPKG').IsChecked = $configContent.CopyPPKG
# Hyper-V Settings
$window.FindName('cmbVMSwitchName').SelectedItem = $configContent.VMSwitchName
$window.FindName('txtVMHostIPAddress').Text = $configContent.VMHostIPAddress
$window.FindName('txtDiskSize').Text = $configContent.Disksize / 1GB
$window.FindName('txtMemory').Text = $configContent.Memory / 1GB
$window.FindName('txtProcessors').Text = $configContent.Processors
$window.FindName('txtVMLocation').Text = $configContent.VMLocation
$window.FindName('cmbLogicalSectorSize').SelectedItem = $configContent.LogicalSectorSizeBytes
# Windows Settings
$window.FindName('txtISOPath').Text = $configContent.ISOPath
$window.FindName('cmbWindowsRelease').SelectedItem = ($script:allWindowsReleases | Where-Object { $_.Value -eq $configContent.WindowsRelease })
$window.FindName('cmbWindowsVersion').SelectedItem = $configContent.WindowsVersion
$window.FindName('cmbWindowsArch').SelectedItem = $configContent.WindowsArch
$window.FindName('cmbWindowsLang').SelectedItem = $configContent.WindowsLang
$window.FindName('cmbWindowsSKU').SelectedItem = $configContent.WindowsSKU
$window.FindName('cmbMediaType').SelectedItem = $configContent.MediaType
$window.FindName('txtProductKey').Text = $configContent.ProductKey
# M365 Apps/Office tab
$window.FindName('chkInstallOffice').IsChecked = $configContent.InstallOffice
$window.FindName('txtOfficePath').Text = $configContent.OfficePath
$window.FindName('chkCopyOfficeConfigXML').IsChecked = $configContent.CopyOfficeConfigXML
$window.FindName('txtOfficeConfigXMLFilePath').Text = $configContent.OfficeConfigXMLFile
# Drivers tab
$window.FindName('chkInstallDrivers').IsChecked = $configContent.InstallDrivers
$window.FindName('chkDownloadDrivers').IsChecked = $configContent.DownloadDrivers
$window.FindName('chkCopyDrivers').IsChecked = $configContent.CopyDrivers
$window.FindName('cmbMake').SelectedItem = $configContent.Make
$window.FindName('cmbModel').Text = $configContent.Model
$window.FindName('txtDriversFolder').Text = $configContent.DriversFolder
$window.FindName('txtPEDriversFolder').Text = $configContent.PEDriversFolder
$window.FindName('chkCopyPEDrivers').IsChecked = $configContent.CopyPEDrivers
# Updates tab
$window.FindName('chkUpdateLatestCU').IsChecked = $configContent.UpdateLatestCU
$window.FindName('chkUpdateLatestNet').IsChecked = $configContent.UpdateLatestNet
$window.FindName('chkUpdateLatestDefender').IsChecked = $configContent.UpdateLatestDefender
$window.FindName('chkUpdateEdge').IsChecked = $configContent.UpdateEdge
$window.FindName('chkUpdateOneDrive').IsChecked = $configContent.UpdateOneDrive
$window.FindName('chkUpdateLatestMSRT').IsChecked = $configContent.UpdateLatestMSRT
$window.FindName('chkUpdatePreviewCU').IsChecked = $configContent.UpdatePreviewCU
# Applications tab
$window.FindName('chkInstallApps').IsChecked = $configContent.InstallApps
}
}
catch {
[System.Windows.MessageBox]::Show("Error loading config file:`n$_","Error","OK","Error")
}
})
[void]$window.ShowDialog() [void]$window.ShowDialog()
+306 -304
View File
@@ -1,9 +1,9 @@
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
Title="FFU Builder UI" Title="FFU Builder UI"
Height="600" Height="750"
Width="900"> Width="980">
<!-- <!--
───────────────────────────────────────────────────────────────── ─────────────────────────────────────────────────────────────────
1) Window.Resources: 1) Window.Resources:
@@ -17,7 +17,6 @@
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="Expander"> <ControlTemplate TargetType="Expander">
<StackPanel> <StackPanel>
<!-- Header Toggle --> <!-- Header Toggle -->
<ToggleButton x:Name="HeaderToggle" <ToggleButton x:Name="HeaderToggle"
IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
@@ -38,7 +37,6 @@
</Setter> </Setter>
</Style> </Style>
</ToggleButton.Style> </ToggleButton.Style>
<!-- Text + Arrow side by side --> <!-- Text + Arrow side by side -->
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBlock Text="Optional Features" <TextBlock Text="Optional Features"
@@ -50,13 +48,11 @@
VerticalAlignment="Center"/> VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
</ToggleButton> </ToggleButton>
<!-- Expanded content --> <!-- Expanded content -->
<ContentPresenter x:Name="ExpandSite" <ContentPresenter x:Name="ExpandSite"
Visibility="Collapsed" Visibility="Collapsed"
Margin="0,4,0,0"/> Margin="0,4,0,0"/>
</StackPanel> </StackPanel>
<!-- Trigger: Show content, swap arrow to “▲” when expanded --> <!-- Trigger: Show content, swap arrow to “▲” when expanded -->
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="IsExpanded" Value="True"> <Trigger Property="IsExpanded" Value="True">
@@ -76,20 +72,149 @@
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<!-- ============================= <!-- TabControl with multiple tabs -->
Main TabControl with 5 tabs
============================= -->
<TabControl TabStripPlacement="Left" <TabControl TabStripPlacement="Left"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
FontSize="14" FontSize="14"
Padding="10" Padding="10"
Grid.Row="0"> Grid.Row="0">
<!-- TAB: Home -->
<TabItem Header="Home" Padding="20">
<Grid Margin="10">
<TextBlock Text="Welcome to FFU Builder"
FontSize="20"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Grid>
</TabItem>
<!-- TAB 1: Basic --> <!-- TAB: Build -->
<TabItem Header="Basic" Padding="20"> <TabItem Header="Build" Padding="20">
<ScrollViewer VerticalScrollBarVisibility="Auto">
<Grid Margin="10">
<!-- Define 10 rows for the Build tab -->
<Grid.RowDefinitions>
<!-- Row 0: Header -->
<RowDefinition Height="Auto"/>
<!-- Row 1: FFU Development Path -->
<RowDefinition Height="Auto"/>
<!-- Row 2: Custom FFU Name Template -->
<RowDefinition Height="Auto"/>
<!-- Row 3: FFU Capture Location -->
<RowDefinition Height="Auto"/>
<!-- Row 4: Share Name -->
<RowDefinition Height="Auto"/>
<!-- Row 5: Username -->
<RowDefinition Height="Auto"/>
<!-- Row 6: General Build Options Header -->
<RowDefinition Height="Auto"/>
<!-- Row 7: General Build Options Checkboxes -->
<RowDefinition Height="Auto"/>
<!-- Row 8: Build USB Drive Header -->
<RowDefinition Height="Auto"/>
<!-- Row 9: Build USB Drive Options Grid -->
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Row 0: Header -->
<TextBlock Grid.Row="0" Text="FFU Build Settings" FontWeight="Bold" FontSize="16" Margin="0,0,0,10"/>
<!-- Row 1: FFU Development Path -->
<Grid Grid.Row="1" Margin="0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="FFU Development Path" VerticalAlignment="Center"/>
<TextBox x:Name="txtFFUDevPath" Grid.Column="1" Margin="5" VerticalAlignment="Center"/>
<Button x:Name="btnBrowseFFUDevPath" Grid.Column="2" Content="Browse..." Width="80" Margin="5,0,0,0" VerticalAlignment="Center" ToolTip="Browse for FFU development folder."/>
</Grid>
<!-- Row 2: Custom FFU Name Template -->
<Grid Grid.Row="2" Margin="0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="Custom FFU Name Template" VerticalAlignment="Center"/>
<TextBox x:Name="txtCustomFFUNameTemplate" Grid.Column="1" Margin="5" VerticalAlignment="Center"/>
</Grid>
<!-- Row 3: FFU Capture Location -->
<Grid Grid.Row="3" Margin="0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="FFU Capture Location" VerticalAlignment="Center"/>
<TextBox x:Name="txtFFUCaptureLocation" Grid.Column="1" Margin="5" VerticalAlignment="Center"/>
<Button x:Name="btnBrowseFFUCaptureLocation" Grid.Column="2" Content="Browse..." Width="80" Margin="5,0,0,0" VerticalAlignment="Center" ToolTip="Browse for FFU capture location."/>
</Grid>
<!-- Row 4: Share Name -->
<Grid Grid.Row="4" Margin="0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="Share Name" VerticalAlignment="Center"/>
<TextBox x:Name="txtShareName" Grid.Column="1" Margin="5" VerticalAlignment="Center"/>
</Grid>
<!-- Row 5: Username -->
<Grid Grid.Row="5" Margin="0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="Username" VerticalAlignment="Center"/>
<TextBox x:Name="txtUsername" Grid.Column="1" Margin="5" VerticalAlignment="Center"/>
</Grid>
<!-- Row 6: General Build Options Header -->
<TextBlock Grid.Row="6" Text="General Build Options" FontWeight="Bold" FontSize="16" Margin="0,10,0,5"/>
<!-- Row 7: General Build Options Checkboxes -->
<WrapPanel Grid.Row="7" Margin="0,5">
<CheckBox x:Name="chkCompactOS" Content="Compact OS" Margin="5" VerticalAlignment="Center" ToolTip="Compact the OS during FFU build."/>
<CheckBox x:Name="chkOptimize" Content="Optimize" Margin="5" VerticalAlignment="Center" ToolTip="Optimize the FFU file."/>
<CheckBox x:Name="chkCreateCaptureMedia" Content="Create Capture Media" Margin="5" VerticalAlignment="Center" ToolTip="Create capture media for FFU."/>
<CheckBox x:Name="chkCreateDeploymentMedia" Content="Create Deployment Media" Margin="5" VerticalAlignment="Center" ToolTip="Create deployment media."/>
</WrapPanel>
<!-- Row 8: Build USB Drive Header -->
<TextBlock Grid.Row="8" Text="Build USB Drive" FontWeight="Bold" FontSize="16" Margin="0,10,0,5"/>
<!-- Row 9: Build USB Drive Options Grid -->
<Grid Grid.Row="9" Margin="0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Left Column: USB Drive Options -->
<StackPanel Grid.Column="0" Margin="5">
<CheckBox x:Name="chkBuildUSBDrive" Content="Build USB Drive" Margin="5" VerticalAlignment="Center" ToolTip="Partition and format a USB drive and copy the captured FFU to the drive."/>
<CheckBox x:Name="chkPromptExternalHardDiskMedia" Content="Prompt External Hard Disk Media" Margin="5" VerticalAlignment="Center" ToolTip="Prompt before using external hard disk media."/>
<CheckBox x:Name="chkAllowExternalHardDiskMedia" Content="Allow External Hard Disk Media" Margin="5" VerticalAlignment="Center" ToolTip="Allow use of external hard disk media."/>
</StackPanel>
<!-- Right Column: USB Drive Modification -->
<StackPanel Grid.Column="1" Margin="5">
<TextBlock Text="USB Drive Modification" FontWeight="Bold" FontSize="16" Margin="5,0,0,5"/>
<CheckBox x:Name="chkCopyAutopilot" Content="Copy Autopilot" Margin="5" VerticalAlignment="Center" ToolTip="Copy the Autopilot folder to the deployment partition."/>
<CheckBox x:Name="chkCopyUnattend" Content="Copy Unattend" Margin="5" VerticalAlignment="Center" ToolTip="Copy the Unattend folder to the deployment partition."/>
<CheckBox x:Name="chkCopyPPKG" Content="Copy PPKG" Margin="5" VerticalAlignment="Center" ToolTip="Copy the PPKG folder to the deployment partition."/>
</StackPanel>
</Grid>
</Grid>
</ScrollViewer>
</TabItem>
<!-- TAB: Hyper-V Settings -->
<TabItem Header="Hyper-V Settings" Padding="20">
<Grid Margin="10"> <Grid Margin="10">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
@@ -97,114 +222,144 @@
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="200"/> <ColumnDefinition Width="200"/>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!-- Row 0: VM Switch Name -->
<!-- FFU Name -->
<StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="0,5"> <StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="0,5">
<TextBlock Text="FFU Name:"/> <TextBlock Text="VM Switch Name" />
<Image x:Name="imgFFUNameInfo" <Image x:Name="imgVMSwitchNameInfo"
Width="16" Height="16" Margin="5,0,0,0" Width="16" Height="16" Margin="5,0,0,0"
ToolTip="Enter a unique name for the FFU. Example: {WindowsRelease}_{WindowsVersion}_{SKU}_{yyyy}-{MM}-{dd}_{HH}{mm}" ToolTip="Select the Hyper-V virtual switch."
Cursor="Arrow"/> Cursor="Arrow"/>
</StackPanel> </StackPanel>
<TextBox x:Name="txtFFUName" <ComboBox x:Name="cmbVMSwitchName"
Grid.Row="0" Grid.Column="1" Grid.Row="0" Grid.Column="1"
Margin="5" Margin="5"
VerticalAlignment="Center" VerticalAlignment="Center"
HorizontalAlignment="Stretch"/> HorizontalAlignment="Stretch"/>
<!-- Row 1: Custom VM Switch Name -->
<!-- FFU Dev Path -->
<StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="0,5">
<TextBlock Text="FFU Development Path:"/>
<Image x:Name="imgFFUDevPathInfo"
Width="16" Height="16" Margin="5,0,0,0"
ToolTip="Defaults to the location the script is run from."
Cursor="Arrow"/>
</StackPanel>
<Grid Grid.Row="1" Grid.Column="1" Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBox x:Name="txtFFUDevPath"
Grid.Column="0"
VerticalAlignment="Center"
HorizontalAlignment="Stretch"/>
<Button x:Name="btnBrowseFFUDevPath"
Grid.Column="1"
Content="Browse..."
Width="80"
Margin="5,0,0,0"
VerticalAlignment="Center"
ToolTip="Browse for FFU Development folder."/>
</Grid>
<!-- VM Switch Name -->
<StackPanel Grid.Row="2" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="0,5">
<TextBlock Text="VM Switch Name:"/>
<Image x:Name="imgVMSwitchNameInfo"
Width="16" Height="16" Margin="5,0,0,0"
ToolTip="Name of the Hyper-V virtual switch."
Cursor="Arrow"/>
</StackPanel>
<ComboBox x:Name="cmbVMSwitchName"
Grid.Row="2" Grid.Column="1"
Margin="5"
VerticalAlignment="Center"
HorizontalAlignment="Stretch"/>
<!-- Custom VM Switch Name -->
<TextBox x:Name="txtCustomVMSwitchName" <TextBox x:Name="txtCustomVMSwitchName"
Grid.Row="3" Grid.Column="1" Grid.Row="1" Grid.Column="1"
Margin="5" Margin="5"
VerticalAlignment="Center" VerticalAlignment="Center"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
Visibility="Collapsed" Visibility="Collapsed"
ToolTip="Enter your custom VM Switch Name."/> ToolTip="Enter your custom VM Switch Name if 'Other' is selected."/>
<!-- Row 2: VM Host IP Address -->
<!-- VM Host IP Address --> <StackPanel Grid.Row="2" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="0,5">
<StackPanel Grid.Row="4" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="0,5"> <TextBlock Text="VM Host IP Address" />
<TextBlock Text="VM Host IP Address:"/>
<Image x:Name="imgVMHostIPAddressInfo" <Image x:Name="imgVMHostIPAddressInfo"
Width="16" Height="16" Width="16" Height="16" Margin="5,0,0,0"
Margin="5,0,0,0"
ToolTip="IP address of the Hyper-V host machine." ToolTip="IP address of the Hyper-V host machine."
Cursor="Arrow"/> Cursor="Arrow"/>
</StackPanel> </StackPanel>
<TextBox x:Name="txtVMHostIPAddress" <TextBox x:Name="txtVMHostIPAddress"
Grid.Row="4" Grid.Column="1" Grid.Row="2" Grid.Column="1"
Margin="5" Margin="5"
VerticalAlignment="Center" VerticalAlignment="Center"
HorizontalAlignment="Stretch"/> HorizontalAlignment="Stretch"/>
<!-- Row 3: Disk Size (GB) -->
<StackPanel Grid.Row="3" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="0,5">
<TextBlock Text="Disk Size (GB)" />
<Image x:Name="imgDiskSizeInfo"
Width="16" Height="16" Margin="5,0,0,0"
ToolTip="Enter the size of the virtual hard disk in GB (e.g. 30)."
Cursor="Arrow"/>
</StackPanel>
<TextBox x:Name="txtDiskSize"
Grid.Row="3" Grid.Column="1"
Margin="5"
VerticalAlignment="Center"
HorizontalAlignment="Stretch"
Text="30"/>
<!-- Row 4: Memory (GB) -->
<StackPanel Grid.Row="4" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="0,5">
<TextBlock Text="Memory (GB)" />
<Image x:Name="imgMemoryInfo"
Width="16" Height="16" Margin="5,0,0,0"
ToolTip="Enter the amount of RAM for the VM in GB (e.g. 4)."
Cursor="Arrow"/>
</StackPanel>
<TextBox x:Name="txtMemory"
Grid.Row="4" Grid.Column="1"
Margin="5"
VerticalAlignment="Center"
HorizontalAlignment="Stretch"
Text="4"/>
<!-- Row 5: Processors -->
<StackPanel Grid.Row="5" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="0,5">
<TextBlock Text="Processors" />
<Image x:Name="imgProcessorsInfo"
Width="16" Height="16" Margin="5,0,0,0"
ToolTip="Enter the number of virtual processors (e.g. 4)."
Cursor="Arrow"/>
</StackPanel>
<TextBox x:Name="txtProcessors"
Grid.Row="5" Grid.Column="1"
Margin="5"
VerticalAlignment="Center"
HorizontalAlignment="Stretch"
Text="4"/>
<!-- Row 6: VM Location -->
<StackPanel Grid.Row="6" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="0,5">
<TextBlock Text="VM Location" />
<Image x:Name="imgVMLocationInfo"
Width="16" Height="16" Margin="5,0,0,0"
ToolTip="Enter the folder path where the VM files will be stored."
Cursor="Arrow"/>
</StackPanel>
<TextBox x:Name="txtVMLocation"
Grid.Row="6" Grid.Column="1"
Margin="5"
VerticalAlignment="Center"
HorizontalAlignment="Stretch"
Text="{x:Static sys:Environment.CurrentDirectory}"/>
<!-- Row 7: Logical Sector Size -->
<StackPanel Grid.Row="7" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="0,5">
<TextBlock Text="Logical Sector Size" />
<Image x:Name="imgLogicalSectorSizeInfo"
Width="16" Height="16" Margin="5,0,0,0"
ToolTip="Select the logical sector size (512 or 4096 bytes)."
Cursor="Arrow"/>
</StackPanel>
<ComboBox x:Name="cmbLogicalSectorSize"
Grid.Row="7" Grid.Column="1"
Margin="5"
VerticalAlignment="Center"
HorizontalAlignment="Left">
<ComboBoxItem Content="512" IsSelected="True"/>
<ComboBoxItem Content="4096"/>
</ComboBox>
</Grid> </Grid>
</TabItem> </TabItem>
<!-- TAB 2: Windows Settings --> <!-- TAB: Windows Settings -->
<TabItem Header="Windows Settings" Padding="20"> <TabItem Header="Windows Settings" Padding="20">
<Grid Margin="10"> <Grid Margin="10">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <!-- row 0: ISO --> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <!-- row 1: Release --> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <!-- row 2: Version --> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <!-- row 3: Arch --> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <!-- row 4: Lang --> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <!-- row 5: SKU --> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <!-- row 6: Media Type --> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <!-- row 7: Product Key --> <RowDefinition Height="Auto"/>
<RowDefinition Height="*" /> <!-- row 8: Expander --> <RowDefinition Height="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="200"/> <ColumnDefinition Width="200"/>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!-- (0) ISO Path --> <!-- (0) ISO Path -->
<StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal" Margin="0,5"> <StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal" Margin="0,5">
<TextBlock Text="Windows ISO Path:" VerticalAlignment="Center"/> <TextBlock Text="Windows ISO Path" VerticalAlignment="Center"/>
<Image x:Name="imgISOPathInfo" <Image x:Name="imgISOPathInfo"
Width="16" Height="16" Margin="5,0,0,0" Width="16" Height="16" Margin="5,0,0,0"
ToolTip="Specify the full path to the Windows ISO file." ToolTip="Specify the full path to the Windows ISO file."
@@ -227,58 +382,49 @@
VerticalAlignment="Center" VerticalAlignment="Center"
ToolTip="Browse for a Windows ISO file."/> ToolTip="Browse for a Windows ISO file."/>
</Grid> </Grid>
<!-- (1) Windows Release --> <!-- (1) Windows Release -->
<StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal" Margin="0,5"> <StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal" Margin="0,5">
<TextBlock Text="Windows Release:" VerticalAlignment="Center"/> <TextBlock Text="Windows Release" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
<ComboBox x:Name="cmbWindowsRelease" <ComboBox x:Name="cmbWindowsRelease"
Grid.Row="1" Grid.Row="1" Grid.Column="1"
Grid.Column="1"
Margin="5" Margin="5"
VerticalAlignment="Center" VerticalAlignment="Center"
HorizontalAlignment="Stretch"/> HorizontalAlignment="Stretch"/>
<!-- (2) Windows Version --> <!-- (2) Windows Version -->
<StackPanel Grid.Row="2" Grid.Column="0" Orientation="Horizontal" Margin="0,5"> <StackPanel Grid.Row="2" Grid.Column="0" Orientation="Horizontal" Margin="0,5">
<TextBlock Text="Windows Version:" VerticalAlignment="Center"/> <TextBlock Text="Windows Version" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
<ComboBox x:Name="cmbWindowsVersion" <ComboBox x:Name="cmbWindowsVersion"
Grid.Row="2" Grid.Row="2" Grid.Column="1"
Grid.Column="1"
Margin="5" Margin="5"
Width="120" Width="120"
VerticalAlignment="Center" VerticalAlignment="Center"
HorizontalAlignment="Left" HorizontalAlignment="Left"
IsEnabled="False"/> IsEnabled="False"/>
<!-- (3) Windows Arch --> <!-- (3) Windows Arch -->
<StackPanel Grid.Row="3" Grid.Column="0" Orientation="Horizontal" Margin="0,5"> <StackPanel Grid.Row="3" Grid.Column="0" Orientation="Horizontal" Margin="0,5">
<TextBlock Text="Windows Architecture:" VerticalAlignment="Center"/> <TextBlock Text="Windows Architecture" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
<ComboBox x:Name="cmbWindowsArch" <ComboBox x:Name="cmbWindowsArch"
Grid.Row="3" Grid.Row="3" Grid.Column="1"
Grid.Column="1"
Margin="5" Margin="5"
Width="120" Width="120"
VerticalAlignment="Center" VerticalAlignment="Center"
HorizontalAlignment="Left"/> HorizontalAlignment="Left"/>
<!-- (4) Windows Lang --> <!-- (4) Windows Lang -->
<StackPanel Grid.Row="4" Grid.Column="0" Orientation="Horizontal" Margin="0,5"> <StackPanel Grid.Row="4" Grid.Column="0" Orientation="Horizontal" Margin="0,5">
<TextBlock Text="Windows Language:" VerticalAlignment="Center"/> <TextBlock Text="Windows Language" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
<ComboBox x:Name="cmbWindowsLang" <ComboBox x:Name="cmbWindowsLang"
Grid.Row="4" Grid.Row="4" Grid.Column="1"
Grid.Column="1"
Margin="5" Margin="5"
Width="120" Width="120"
VerticalAlignment="Center" VerticalAlignment="Center"
HorizontalAlignment="Left"/> HorizontalAlignment="Left"/>
<!-- (5) Windows SKU --> <!-- (5) Windows SKU -->
<StackPanel Grid.Row="5" Grid.Column="0" Orientation="Horizontal" Margin="0,5"> <StackPanel Grid.Row="5" Grid.Column="0" Orientation="Horizontal" Margin="0,5">
<TextBlock Text="Windows SKU:" VerticalAlignment="Center"/> <TextBlock Text="Windows SKU" VerticalAlignment="Center"/>
<Image x:Name="imgWindowsSKUInfo" <Image x:Name="imgWindowsSKUInfo"
Width="16" Width="16"
Height="16" Height="16"
@@ -287,36 +433,30 @@
Cursor="Arrow"/> Cursor="Arrow"/>
</StackPanel> </StackPanel>
<ComboBox x:Name="cmbWindowsSKU" <ComboBox x:Name="cmbWindowsSKU"
Grid.Row="5" Grid.Row="5" Grid.Column="1"
Grid.Column="1"
Margin="5" Margin="5"
VerticalAlignment="Center" VerticalAlignment="Center"
HorizontalAlignment="Stretch"/> HorizontalAlignment="Stretch"/>
<!-- (6) Media Type --> <!-- (6) Media Type -->
<StackPanel Grid.Row="6" Grid.Column="0" Orientation="Horizontal" Margin="0,5"> <StackPanel Grid.Row="6" Grid.Column="0" Orientation="Horizontal" Margin="0,5">
<TextBlock Text="Media Type:" VerticalAlignment="Center"/> <TextBlock Text="Media Type" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
<ComboBox x:Name="cmbMediaType" <ComboBox x:Name="cmbMediaType"
Grid.Row="6" Grid.Row="6" Grid.Column="1"
Grid.Column="1"
Margin="5" Margin="5"
Width="120" Width="120"
VerticalAlignment="Center" VerticalAlignment="Center"
HorizontalAlignment="Left"/> HorizontalAlignment="Left"/>
<!-- (7) Product Key --> <!-- (7) Product Key -->
<StackPanel Grid.Row="7" Grid.Column="0" Orientation="Horizontal" Margin="0,5"> <StackPanel Grid.Row="7" Grid.Column="0" Orientation="Horizontal" Margin="0,5">
<TextBlock Text="Product Key:" VerticalAlignment="Center"/> <TextBlock Text="Product Key" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
<TextBox x:Name="txtProductKey" <TextBox x:Name="txtProductKey"
Grid.Row="7" Grid.Row="7" Grid.Column="1"
Grid.Column="1"
Margin="5" Margin="5"
VerticalAlignment="Center" VerticalAlignment="Center"
HorizontalAlignment="Stretch"/> HorizontalAlignment="Stretch"/>
<!-- (8) Expander for Optional Features -->
<!-- (8) Expander with top margin so it has spacing from "Product Key" above -->
<Expander x:Name="expOptionalFeatures" <Expander x:Name="expOptionalFeatures"
Style="{StaticResource MinimalExpanderNoHighlightStyle}" Style="{StaticResource MinimalExpanderNoHighlightStyle}"
Grid.Row="8" Grid.Row="8"
@@ -325,8 +465,6 @@
IsExpanded="False" IsExpanded="False"
Margin="0,5,0,0" Margin="0,5,0,0"
ExpandDirection="Down"> ExpandDirection="Down">
<!-- Optional Features content -->
<ScrollViewer HorizontalScrollBarVisibility="Auto" <ScrollViewer HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"
Margin="0,5,0,0"> Margin="0,5,0,0">
@@ -345,7 +483,20 @@
</Grid> </Grid>
</TabItem> </TabItem>
<!-- TAB 3: Applications --> <!-- TAB: Updates -->
<TabItem Header="Updates" Padding="20">
<StackPanel Margin="5">
<CheckBox x:Name="chkUpdateLatestCU" Content="Update Latest Cumulative Update" Margin="5" VerticalAlignment="Center" ToolTip="Download and install the latest cumulative update."/>
<CheckBox x:Name="chkUpdateLatestNet" Content="Update .NET" Margin="5" VerticalAlignment="Center" ToolTip="Download and install the latest .NET Framework update."/>
<CheckBox x:Name="chkUpdateLatestDefender" Content="Update Defender" Margin="5" VerticalAlignment="Center" ToolTip="Download and install the latest Defender updates."/>
<CheckBox x:Name="chkUpdateEdge" Content="Update Edge" Margin="5" VerticalAlignment="Center" ToolTip="Download and install the latest Microsoft Edge update."/>
<CheckBox x:Name="chkUpdateOneDrive" Content="Update OneDrive (Per-Machine)" Margin="5" VerticalAlignment="Center" ToolTip="Download and install the latest OneDrive update for per-machine installation."/>
<CheckBox x:Name="chkUpdateLatestMSRT" Content="Update Microsoft Software Removal Tool (MSRT)" Margin="5" VerticalAlignment="Center" ToolTip="Download and install the latest MSRT update."/>
<CheckBox x:Name="chkUpdatePreviewCU" Content="Update Preview Cumulative Update" Margin="5" VerticalAlignment="Center" ToolTip="Download and install the latest preview cumulative update."/>
</StackPanel>
</TabItem>
<!-- TAB: Applications -->
<TabItem Header="Applications" Padding="20"> <TabItem Header="Applications" Padding="20">
<Grid Margin="10"> <Grid Margin="10">
<Grid.RowDefinitions> <Grid.RowDefinitions>
@@ -355,19 +506,18 @@
<ColumnDefinition Width="150"/> <ColumnDefinition Width="150"/>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal" Margin="0,5"> <StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal" Margin="0,5">
<CheckBox x:Name="chkInstallApps" Content="Install Apps" Margin="0,0,5,0"/> <CheckBox x:Name="chkInstallApps" Content="Install Apps" Margin="0,0,5,0"/>
<Image x:Name="imgInstallAppsInfo" <Image x:Name="imgInstallAppsInfo"
Width="16" Width="16"
Height="16" Height="16" Margin="5,0,0,0"
Cursor="Arrow" ToolTip="Check to include additional applications in the FFU."
ToolTip="Check to include additional applications in the FFU."/> Cursor="Arrow"/>
</StackPanel> </StackPanel>
</Grid> </Grid>
</TabItem> </TabItem>
<!-- TAB 4: M365 Apps/Office --> <!-- TAB: M365 Apps/Office -->
<TabItem Header="M365 Apps/Office" Padding="20"> <TabItem Header="M365 Apps/Office" Padding="20">
<Grid Margin="10"> <Grid Margin="10">
<Grid.RowDefinitions> <Grid.RowDefinitions>
@@ -380,8 +530,6 @@
<ColumnDefinition Width="250"/> <ColumnDefinition Width="250"/>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!-- Install Office -->
<StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal" Margin="0,5"> <StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal" Margin="0,5">
<CheckBox x:Name="chkInstallOffice" Content="Install Office" Margin="0,0,5,0"/> <CheckBox x:Name="chkInstallOffice" Content="Install Office" Margin="0,0,5,0"/>
<Image x:Name="imgInstallOfficeInfo" <Image x:Name="imgInstallOfficeInfo"
@@ -389,94 +537,41 @@
Cursor="Arrow" Cursor="Arrow"
ToolTip="Check to install Microsoft Office as part of the FFU."/> ToolTip="Check to install Microsoft Office as part of the FFU."/>
</StackPanel> </StackPanel>
<StackPanel x:Name="OfficePathStackPanel" Grid.Row="1" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="0,5">
<!-- Office Path --> <TextBlock Text="Office Path"/>
<StackPanel x:Name="OfficePathStackPanel"
Grid.Row="1"
Grid.Column="0"
Orientation="Horizontal"
VerticalAlignment="Center"
Margin="0,5">
<TextBlock Text="Office Path:"/>
<Image x:Name="imgOfficePathInfo" <Image x:Name="imgOfficePathInfo"
Width="16" Height="16" Width="16" Height="16" Margin="5,0,0,0"
Margin="5,0,0,0"
Cursor="Arrow" Cursor="Arrow"
ToolTip="Path to the Microsoft Office installation."/> ToolTip="Path to the Microsoft Office installation."/>
</StackPanel> </StackPanel>
<Grid x:Name="OfficePathGrid" <Grid x:Name="OfficePathGrid" Grid.Row="1" Grid.Column="1" Margin="5">
Grid.Row="1"
Grid.Column="1"
Margin="5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBox x:Name="txtOfficePath" <TextBox x:Name="txtOfficePath" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Stretch"/>
Grid.Column="0" <Button x:Name="btnBrowseOfficePath" Grid.Column="1" Content="Browse..." Width="80" VerticalAlignment="Center" ToolTip="Browse for Office installation folder."/>
VerticalAlignment="Center"
HorizontalAlignment="Stretch"/>
<Button x:Name="btnBrowseOfficePath"
Grid.Column="1"
Content="Browse..."
Width="80"
VerticalAlignment="Center"
ToolTip="Browse for Office installation folder."/>
</Grid> </Grid>
<StackPanel x:Name="CopyOfficeConfigXMLStackPanel" Grid.Row="2" Grid.Column="0" Orientation="Horizontal" Margin="0,5">
<!-- Copy Office Config XML -->
<StackPanel x:Name="CopyOfficeConfigXMLStackPanel"
Grid.Row="2" Grid.Column="0"
Orientation="Horizontal"
Margin="0,5">
<CheckBox x:Name="chkCopyOfficeConfigXML" Content="Copy Office Configuration XML" Margin="0,0,5,0"/> <CheckBox x:Name="chkCopyOfficeConfigXML" Content="Copy Office Configuration XML" Margin="0,0,5,0"/>
<Image x:Name="imgCopyOfficeConfigXMLInfo" <Image x:Name="imgCopyOfficeConfigXMLInfo" Width="16" Height="16" Margin="5,0,0,0" Cursor="Arrow" ToolTip="Check to copy the Office Configuration XML."/>
Width="16" Height="16"
Margin="5,0,0,0"
Cursor="Arrow"
ToolTip="Check to copy the Office Configuration XML."/>
</StackPanel> </StackPanel>
<StackPanel x:Name="OfficeConfigurationXMLFileStackPanel" Grid.Row="3" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="0,5" Visibility="Collapsed">
<!-- OfficeConfigurationXMLFile --> <TextBlock Text="Office Configuration XML File"/>
<StackPanel x:Name="OfficeConfigurationXMLFileStackPanel" <Image x:Name="imgOfficeConfigXMLFileInfo" Width="16" Height="16" Margin="5,0,0,0" Cursor="Arrow" ToolTip="Select the Office Configuration XML file to copy."/>
Grid.Row="3"
Grid.Column="0"
Orientation="Horizontal"
VerticalAlignment="Center"
Margin="0,5"
Visibility="Collapsed">
<TextBlock Text="Office Configuration XML File:"/>
<Image x:Name="imgOfficeConfigXMLFileInfo"
Width="16" Height="16"
Margin="5,0,0,0"
Cursor="Arrow"
ToolTip="Select the Office Configuration XML file to copy."/>
</StackPanel> </StackPanel>
<Grid x:Name="OfficeConfigurationXMLFileGrid" <Grid x:Name="OfficeConfigurationXMLFileGrid" Grid.Row="3" Grid.Column="1" Margin="5" Visibility="Collapsed">
Grid.Row="3"
Grid.Column="1"
Margin="5"
Visibility="Collapsed">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBox x:Name="txtOfficeConfigXMLFilePath" <TextBox x:Name="txtOfficeConfigXMLFilePath" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Stretch"/>
Grid.Column="0" <Button x:Name="btnBrowseOfficeConfigXMLFile" Grid.Column="1" Content="Browse..." Width="80" Margin="5,0,0,0" VerticalAlignment="Center" ToolTip="Browse for an Office Configuration XML file."/>
VerticalAlignment="Center"
HorizontalAlignment="Stretch"/>
<Button x:Name="btnBrowseOfficeConfigXMLFile"
Grid.Column="1"
Content="Browse..."
Width="80"
Margin="5,0,0,0"
VerticalAlignment="Center"
ToolTip="Browse for an Office Configuration XML file."/>
</Grid> </Grid>
</Grid> </Grid>
</TabItem> </TabItem>
<!-- TAB 5: DRIVERS --> <!-- TAB: Drivers -->
<TabItem Header="Drivers" Padding="20"> <TabItem Header="Drivers" Padding="20">
<Grid Margin="10"> <Grid Margin="10">
<Grid.RowDefinitions> <Grid.RowDefinitions>
@@ -492,40 +587,19 @@
<ColumnDefinition Width="250"/> <ColumnDefinition Width="250"/>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!-- Install Drivers -->
<StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal" Margin="5"> <StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal" Margin="5">
<CheckBox x:Name="chkInstallDrivers" Content="Install Drivers to FFU" Margin="0,0,5,0"/> <CheckBox x:Name="chkInstallDrivers" Content="Install Drivers to FFU" Margin="0,0,5,0"/>
<Image x:Name="imgInstallDriversInfo" <Image x:Name="imgInstallDriversInfo" Width="16" Height="16" Cursor="Arrow" ToolTip="Inject drivers directly into the FFU."/>
Width="16" Height="16"
Cursor="Arrow"
ToolTip="Use DISM to service drivers directly into the FFU."/>
</StackPanel> </StackPanel>
<!-- Copy Drivers -->
<StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal" Margin="5"> <StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal" Margin="5">
<CheckBox x:Name="chkCopyDrivers" Content="Copy Drivers to USB drive" Margin="0,0,5,0"/> <CheckBox x:Name="chkCopyDrivers" Content="Copy Drivers to USB drive" Margin="0,0,5,0"/>
<Image x:Name="imgCopyDriversInfo" <Image x:Name="imgCopyDriversInfo" Width="16" Height="16" Cursor="Arrow" ToolTip="Copy the drivers folder to the USB deploy partition."/>
Width="16" Height="16"
Cursor="Arrow"
ToolTip="Copy the drivers folder to the USB deploy partition."/>
</StackPanel> </StackPanel>
<!-- Download Drivers -->
<StackPanel Grid.Row="2" Grid.Column="0" Orientation="Horizontal" Margin="5"> <StackPanel Grid.Row="2" Grid.Column="0" Orientation="Horizontal" Margin="5">
<CheckBox x:Name="chkDownloadDrivers" Content="Download Drivers" Margin="0,0,5,0"/> <CheckBox x:Name="chkDownloadDrivers" Content="Download Drivers" Margin="0,0,5,0"/>
<Image x:Name="imgDownloadDriversInfo" <Image x:Name="imgDownloadDriversInfo" Width="16" Height="16" Cursor="Arrow" ToolTip="Check to download drivers automatically."/>
Width="16" Height="16"
Cursor="Arrow"
ToolTip="Check to download drivers automatically."/>
</StackPanel> </StackPanel>
<StackPanel x:Name="spMakeModelSection" Grid.Row="3" Grid.ColumnSpan="2" Visibility="Collapsed" Margin="0">
<!-- Make/Model -->
<StackPanel x:Name="spMakeModelSection"
Grid.Row="3"
Grid.ColumnSpan="2"
Visibility="Collapsed"
Margin="0">
<Grid Margin="0"> <Grid Margin="0">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
@@ -535,131 +609,59 @@
<ColumnDefinition Width="250"/> <ColumnDefinition Width="250"/>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!-- Make -->
<StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal" Margin="5"> <StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal" Margin="5">
<TextBlock x:Name="txtMakeLabel" Text="Make: " VerticalAlignment="Center"/> <TextBlock x:Name="txtMakeLabel" Text="Make: " VerticalAlignment="Center"/>
<Image x:Name="imgMakeInfo" <Image x:Name="imgMakeInfo" Width="16" Height="16" Margin="5,0,0,0" Cursor="Arrow" ToolTip="Select the device manufacturer."/>
Width="16" Height="16" Margin="5,0,0,0"
Cursor="Arrow"
ToolTip="Select the device manufacturer."/>
</StackPanel> </StackPanel>
<ComboBox x:Name="cmbMake" <ComboBox x:Name="cmbMake" Grid.Row="0" Grid.Column="1" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Stretch"/>
Grid.Row="0"
Grid.Column="1"
Margin="5"
VerticalAlignment="Center"
HorizontalAlignment="Stretch"/>
<!-- Model -->
<StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal" Margin="5"> <StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal" Margin="5">
<TextBlock x:Name="txtModelLabel" Text="Model: " VerticalAlignment="Center"/> <TextBlock x:Name="txtModelLabel" Text="Model: " VerticalAlignment="Center"/>
<Image x:Name="imgModelInfo" <Image x:Name="imgModelInfo" Width="16" Height="16" Margin="5,0,0,0" Cursor="Arrow" ToolTip="Enter the device model."/>
Width="16" Height="16" Margin="5,0,0,0"
Cursor="Arrow"
ToolTip="Enter the device model."/>
</StackPanel> </StackPanel>
<TextBox x:Name="cmbModel" <TextBox x:Name="cmbModel" Grid.Row="1" Grid.Column="1" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Stretch"/>
Grid.Row="1"
Grid.Column="1"
Margin="5"
VerticalAlignment="Center"
HorizontalAlignment="Stretch"/>
</Grid> </Grid>
</StackPanel> </StackPanel>
<!-- Drivers Folder -->
<StackPanel Grid.Row="4" Grid.Column="0" Orientation="Horizontal" Margin="5"> <StackPanel Grid.Row="4" Grid.Column="0" Orientation="Horizontal" Margin="5">
<TextBlock Text="Drivers Folder:" VerticalAlignment="Center"/> <TextBlock Text="Drivers Folder:" VerticalAlignment="Center"/>
<Image x:Name="imgDriversFolderInfo" <Image x:Name="imgDriversFolderInfo" Width="16" Height="16" Margin="5,0,0,0" Cursor="Arrow" ToolTip="Path to the Drivers folder."/>
Width="16" Height="16" Margin="5,0,0,0"
Cursor="Arrow"
ToolTip="Path to the Drivers folder."/>
</StackPanel> </StackPanel>
<Grid Grid.Row="4" Grid.Column="1" Margin="5"> <Grid Grid.Row="4" Grid.Column="1" Margin="5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBox x:Name="txtDriversFolder" <TextBox x:Name="txtDriversFolder" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Stretch"/>
Grid.Column="0" <Button x:Name="btnBrowseDriversFolder" Grid.Column="1" Content="Browse..." Width="80" Margin="5,0,0,0" VerticalAlignment="Center" ToolTip="Browse for Drivers folder."/>
VerticalAlignment="Center"
HorizontalAlignment="Stretch"/>
<Button x:Name="btnBrowseDriversFolder"
Grid.Column="1"
Content="Browse..."
Width="80"
Margin="5,0,0,0"
VerticalAlignment="Center"
ToolTip="Browse for Drivers folder."/>
</Grid> </Grid>
<!-- Copy PE Drivers -->
<StackPanel Grid.Row="5" Grid.Column="0" Orientation="Horizontal" Margin="5"> <StackPanel Grid.Row="5" Grid.Column="0" Orientation="Horizontal" Margin="5">
<CheckBox x:Name="chkCopyPEDrivers" Content="Copy PE Drivers" Margin="0,0,5,0"/> <CheckBox x:Name="chkCopyPEDrivers" Content="Copy PE Drivers" Margin="0,0,5,0"/>
<Image x:Name="imgCopyPEDriversInfo" <Image x:Name="imgCopyPEDriversInfo" Width="16" Height="16" Cursor="Arrow" ToolTip="Copy local PE Drivers folder to the build."/>
Width="16" Height="16"
Cursor="Arrow"
ToolTip="Copy local PE Drivers folder to the build."/>
</StackPanel> </StackPanel>
<!-- PE Drivers Folder -->
<StackPanel Grid.Row="6" Grid.Column="0" Orientation="Horizontal" Margin="5"> <StackPanel Grid.Row="6" Grid.Column="0" Orientation="Horizontal" Margin="5">
<TextBlock Text="PE Drivers Folder:" VerticalAlignment="Center"/> <TextBlock Text="PE Drivers Folder:" VerticalAlignment="Center"/>
<Image x:Name="imgPEDriversFolderInfo" <Image x:Name="imgPEDriversFolderInfo" Width="16" Height="16" Margin="5,0,0,0" Cursor="Arrow" ToolTip="Path to the PE Drivers folder."/>
Width="16" Height="16" Margin="5,0,0,0"
Cursor="Arrow"
ToolTip="Path to the PE Drivers folder."/>
</StackPanel> </StackPanel>
<Grid Grid.Row="6" Grid.Column="1" Margin="5"> <Grid Grid.Row="6" Grid.Column="1" Margin="5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBox x:Name="txtPEDriversFolder" <TextBox x:Name="txtPEDriversFolder" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Stretch"/>
Grid.Column="0" <Button x:Name="btnBrowsePEDrivers" Grid.Column="1" Content="Browse..." Width="80" Margin="5,0,0,0" VerticalAlignment="Center" ToolTip="Browse for PE Drivers folder."/>
VerticalAlignment="Center"
HorizontalAlignment="Stretch"/>
<Button x:Name="btnBrowsePEDrivers"
Grid.Column="1"
Content="Browse..."
Width="80"
Margin="5,0,0,0"
VerticalAlignment="Center"
ToolTip="Browse for PE Drivers folder."/>
</Grid> </Grid>
</Grid> </Grid>
</TabItem> </TabItem>
</TabControl> </TabControl>
<!-- Progress Bar --> <!-- Progress Bar -->
<ProgressBar x:Name="progressBar" <ProgressBar x:Name="progressBar" Height="20" Margin="0,10,0,0" Grid.Row="1" Visibility="Collapsed"/>
Height="20"
Margin="0,10,0,0"
Grid.Row="1"
Visibility="Collapsed"/>
<!-- Status Text --> <!-- Status Text -->
<TextBlock x:Name="txtStatus" <TextBlock x:Name="txtStatus" Grid.Row="2" Margin="0,5,0,0"/>
Grid.Row="2" <!-- Buttons (Build Config File / Load Config File / Build FFU) -->
Margin="0,5,0,0"/> <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,20,20">
<Button x:Name="btnBuildConfig" Content="Build Config File" Width="150" Margin="0,0,10,0" FontSize="14" Padding="10,5"/>
<!-- Buttons (Build Config File / Build FFU) --> <Button x:Name="btnLoadConfig" Content="Load Config File" Width="150" Margin="0,0,10,0" FontSize="14" Padding="10,5"/>
<StackPanel Grid.Row="3" <Button x:Name="btnRun" Content="Build FFU" Width="120" FontSize="14" Padding="10,5"/>
Orientation="Horizontal"
HorizontalAlignment="Right"
Margin="0,0,20,20">
<Button x:Name="btnBuildConfig"
Content="Build Config File"
Width="150"
Margin="0,0,10,0"
FontSize="14"
Padding="10,5"/>
<Button x:Name="btnRun"
Content="Build FFU"
Width="120"
FontSize="14"
Padding="10,5"/>
</StackPanel> </StackPanel>
</Grid> </Grid>
</Window> </Window>