mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
Add 'Update ADK' checkbox to UI and update related logic for handling ADK installation
This commit is contained in:
@@ -652,7 +652,7 @@ function Get-UIConfig {
|
|||||||
RemoveFFU = $window.FindName('chkRemoveFFU').IsChecked
|
RemoveFFU = $window.FindName('chkRemoveFFU').IsChecked
|
||||||
RemoveUpdates = $window.FindName('chkRemoveUpdates').IsChecked
|
RemoveUpdates = $window.FindName('chkRemoveUpdates').IsChecked
|
||||||
ShareName = $window.FindName('txtShareName').Text
|
ShareName = $window.FindName('txtShareName').Text
|
||||||
UpdateADK = $true # Parameter from Sample_default.json, no UI control
|
UpdateADK = $script:chkUpdateADK.IsChecked
|
||||||
UpdateEdge = $window.FindName('chkUpdateEdge').IsChecked
|
UpdateEdge = $window.FindName('chkUpdateEdge').IsChecked
|
||||||
UpdateLatestCU = $window.FindName('chkUpdateLatestCU').IsChecked
|
UpdateLatestCU = $window.FindName('chkUpdateLatestCU').IsChecked
|
||||||
UpdateLatestDefender = $window.FindName('chkUpdateLatestDefender').IsChecked
|
UpdateLatestDefender = $window.FindName('chkUpdateLatestDefender').IsChecked
|
||||||
@@ -1713,6 +1713,8 @@ $window.Add_Loaded({
|
|||||||
$window.FindName('txtUsername').Text = $script:generalDefaults.Username
|
$window.FindName('txtUsername').Text = $script:generalDefaults.Username
|
||||||
$window.FindName('chkBuildUSBDriveEnable').IsChecked = $script:generalDefaults.BuildUSBDriveEnable
|
$window.FindName('chkBuildUSBDriveEnable').IsChecked = $script:generalDefaults.BuildUSBDriveEnable
|
||||||
$window.FindName('chkCompactOS').IsChecked = $script:generalDefaults.CompactOS
|
$window.FindName('chkCompactOS').IsChecked = $script:generalDefaults.CompactOS
|
||||||
|
$script:chkUpdateADK = $window.FindName('chkUpdateADK') # Assign chkUpdateADK
|
||||||
|
$script:chkUpdateADK.IsChecked = $script:generalDefaults.UpdateADK # Set default for chkUpdateADK
|
||||||
$window.FindName('chkOptimize').IsChecked = $script:generalDefaults.Optimize
|
$window.FindName('chkOptimize').IsChecked = $script:generalDefaults.Optimize
|
||||||
$window.FindName('chkAllowVHDXCaching').IsChecked = $script:generalDefaults.AllowVHDXCaching
|
$window.FindName('chkAllowVHDXCaching').IsChecked = $script:generalDefaults.AllowVHDXCaching
|
||||||
$window.FindName('chkCreateCaptureMedia').IsChecked = $script:generalDefaults.CreateCaptureMedia
|
$window.FindName('chkCreateCaptureMedia').IsChecked = $script:generalDefaults.CreateCaptureMedia
|
||||||
@@ -3009,6 +3011,7 @@ $btnLoadConfig.Add_Click({
|
|||||||
Set-UIValue -ControlName 'txtUsername' -PropertyName 'Text' -ConfigObject $configContent -ConfigKey 'Username' -WindowInstance $window
|
Set-UIValue -ControlName 'txtUsername' -PropertyName 'Text' -ConfigObject $configContent -ConfigKey 'Username' -WindowInstance $window
|
||||||
Set-UIValue -ControlName 'chkBuildUSBDriveEnable' -PropertyName 'IsChecked' -ConfigObject $configContent -ConfigKey 'BuildUSBDrive' -WindowInstance $window
|
Set-UIValue -ControlName 'chkBuildUSBDriveEnable' -PropertyName 'IsChecked' -ConfigObject $configContent -ConfigKey 'BuildUSBDrive' -WindowInstance $window
|
||||||
Set-UIValue -ControlName 'chkCompactOS' -PropertyName 'IsChecked' -ConfigObject $configContent -ConfigKey 'CompactOS' -WindowInstance $window
|
Set-UIValue -ControlName 'chkCompactOS' -PropertyName 'IsChecked' -ConfigObject $configContent -ConfigKey 'CompactOS' -WindowInstance $window
|
||||||
|
Set-UIValue -ControlName 'chkUpdateADK' -PropertyName 'IsChecked' -ConfigObject $configContent -ConfigKey 'UpdateADK' -WindowInstance $window # Added for UpdateADK
|
||||||
Set-UIValue -ControlName 'chkOptimize' -PropertyName 'IsChecked' -ConfigObject $configContent -ConfigKey 'Optimize' -WindowInstance $window
|
Set-UIValue -ControlName 'chkOptimize' -PropertyName 'IsChecked' -ConfigObject $configContent -ConfigKey 'Optimize' -WindowInstance $window
|
||||||
Set-UIValue -ControlName 'chkAllowVHDXCaching' -PropertyName 'IsChecked' -ConfigObject $configContent -ConfigKey 'AllowVHDXCaching' -WindowInstance $window
|
Set-UIValue -ControlName 'chkAllowVHDXCaching' -PropertyName 'IsChecked' -ConfigObject $configContent -ConfigKey 'AllowVHDXCaching' -WindowInstance $window
|
||||||
Set-UIValue -ControlName 'chkAllowExternalHardDiskMedia' -PropertyName 'IsChecked' -ConfigObject $configContent -ConfigKey 'AllowExternalHardDiskMedia' -WindowInstance $window
|
Set-UIValue -ControlName 'chkAllowExternalHardDiskMedia' -PropertyName 'IsChecked' -ConfigObject $configContent -ConfigKey 'AllowExternalHardDiskMedia' -WindowInstance $window
|
||||||
|
|||||||
@@ -177,6 +177,7 @@
|
|||||||
<WrapPanel Grid.Row="7" Margin="0,5">
|
<WrapPanel Grid.Row="7" Margin="0,5">
|
||||||
<CheckBox x:Name="chkBuildUSBDriveEnable" Content="Build USB Drive" Margin="5" VerticalAlignment="Center" Tag="When set to $true, will partition and format a USB drive and copy the captured FFU to the drive."/>
|
<CheckBox x:Name="chkBuildUSBDriveEnable" Content="Build USB Drive" Margin="5" VerticalAlignment="Center" Tag="When set to $true, will partition and format a USB drive and copy the captured FFU to the drive."/>
|
||||||
<CheckBox x:Name="chkCompactOS" Content="Compact OS" Margin="5" VerticalAlignment="Center" Tag="When set to $true, will compact the OS when building the FFU."/>
|
<CheckBox x:Name="chkCompactOS" Content="Compact OS" Margin="5" VerticalAlignment="Center" Tag="When set to $true, will compact the OS when building the FFU."/>
|
||||||
|
<CheckBox x:Name="chkUpdateADK" Content="Update ADK" Margin="5" VerticalAlignment="Center" Tag="When set to $true, the script will check for and install/update to the latest Windows ADK and WinPE add-on."/>
|
||||||
<CheckBox x:Name="chkOptimize" Content="Optimize" Margin="5" VerticalAlignment="Center" Tag="When set to $true, will optimize the OS when building the FFU."/>
|
<CheckBox x:Name="chkOptimize" Content="Optimize" Margin="5" VerticalAlignment="Center" Tag="When set to $true, will optimize the OS when building the FFU."/>
|
||||||
<CheckBox x:Name="chkAllowVHDXCaching" Content="Allow VHDX Caching" Margin="5" VerticalAlignment="Center" Tag="When set to $true, will cache the VHDX file to cache folder and create a config json file to track Windows build information."/>
|
<CheckBox x:Name="chkAllowVHDXCaching" Content="Allow VHDX Caching" Margin="5" VerticalAlignment="Center" Tag="When set to $true, will cache the VHDX file to cache folder and create a config json file to track Windows build information."/>
|
||||||
<CheckBox x:Name="chkCreateCaptureMedia" Content="Create Capture Media" Margin="5" VerticalAlignment="Center" Tag="When set to $true, this will create WinPE capture media for use when InstallApps is set to $true."/>
|
<CheckBox x:Name="chkCreateCaptureMedia" Content="Create Capture Media" Margin="5" VerticalAlignment="Center" Tag="When set to $true, this will create WinPE capture media for use when InstallApps is set to $true."/>
|
||||||
|
|||||||
@@ -328,6 +328,7 @@ function Get-GeneralDefaults {
|
|||||||
InstallDrivers = $false
|
InstallDrivers = $false
|
||||||
CopyDrivers = $false
|
CopyDrivers = $false
|
||||||
CopyPEDrivers = $false
|
CopyPEDrivers = $false
|
||||||
|
UpdateADK = $true # Added for UpdateADK UI control
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user