feat: Clean up driver source and obsolete config

Automatically deletes the source driver folder after successful compression into a WIM file to conserve disk space. A failure to delete will only log a warning and not interrupt the process.

Removes unused 'Make' and 'Model' properties from the UI configuration.
This commit is contained in:
rbalsleyMSFT
2025-06-26 18:12:35 -07:00
parent 98c5946efd
commit 9bbb40ce8c
2 changed files with 25 additions and 13 deletions
@@ -49,21 +49,21 @@ function Get-UIConfig {
InstallWingetApps = $State.Controls.chkInstallWingetApps.IsChecked
ISOPath = $State.Controls.txtISOPath.Text
LogicalSectorSizeBytes = [int]$State.Controls.cmbLogicalSectorSize.SelectedItem.Content
Make = $State.Controls.cmbMake.SelectedItem
# Make = $null
MediaType = $State.Controls.cmbMediaType.SelectedItem
Memory = [int64]$State.Controls.txtMemory.Text * 1GB
Model = if ($State.Controls.chkDownloadDrivers.IsChecked) {
$selectedModels = $State.Controls.lstDriverModels.Items | Where-Object { $_.IsSelected }
if ($selectedModels.Count -ge 1) {
$selectedModels[0].Model
}
else {
$null
}
}
else {
$null
}
# Model = if ($State.Controls.chkDownloadDrivers.IsChecked) {
# $selectedModels = $State.Controls.lstDriverModels.Items | Where-Object { $_.IsSelected }
# if ($selectedModels.Count -ge 1) {
# $selectedModels[0].Model
# }
# else {
# $null
# }
# }
# else {
# $null
# }
OfficeConfigXMLFile = $State.Controls.txtOfficeConfigXMLFilePath.Text
OfficePath = $State.Controls.txtOfficePath.Text
Optimize = $State.Controls.chkOptimize.IsChecked