feat: Add new checkbox to Inject Unattend.xml to VM.

- Creates a new parameter [bool]InjectUnattend

- This will take the FFUDevelopment\Unattend\unattend_[arch].xml file and copy it to the FFUDevelopment\Apps\Unattend and rename the file to unattend.xml.

- This is useful for situations where you don't use the USB drive for deploying the FFU but still have Unattend-related customizations that you want to apply.
This commit is contained in:
rbalsleyMSFT
2025-08-14 16:20:55 -07:00
parent 85383f989a
commit 8ab6603999
6 changed files with 45 additions and 8 deletions
@@ -38,6 +38,7 @@ function Get-UIConfig {
CopyUnattend = $State.Controls.chkCopyUnattend.IsChecked
CreateCaptureMedia = $State.Controls.chkCreateCaptureMedia.IsChecked
CreateDeploymentMedia = $State.Controls.chkCreateDeploymentMedia.IsChecked
InjectUnattend = $State.Controls.chkInjectUnattend.IsChecked
CustomFFUNameTemplate = $State.Controls.txtCustomFFUNameTemplate.Text
Disksize = [int64]$State.Controls.txtDiskSize.Text * 1GB
DownloadDrivers = $State.Controls.chkDownloadDrivers.IsChecked
@@ -340,6 +341,7 @@ function Update-UIFromConfig {
Set-UIValue -ControlName 'chkPromptExternalHardDiskMedia' -PropertyName 'IsChecked' -ConfigObject $ConfigContent -ConfigKey 'PromptExternalHardDiskMedia' -State $State
Set-UIValue -ControlName 'chkCreateCaptureMedia' -PropertyName 'IsChecked' -ConfigObject $ConfigContent -ConfigKey 'CreateCaptureMedia' -State $State
Set-UIValue -ControlName 'chkCreateDeploymentMedia' -PropertyName 'IsChecked' -ConfigObject $ConfigContent -ConfigKey 'CreateDeploymentMedia' -State $State
Set-UIValue -ControlName 'chkInjectUnattend' -PropertyName 'IsChecked' -ConfigObject $ConfigContent -ConfigKey 'InjectUnattend' -State $State
Set-UIValue -ControlName 'chkVerbose' -PropertyName 'IsChecked' -ConfigObject $ConfigContent -ConfigKey 'Verbose' -State $State
# USB Drive Modification group (Build Tab)