Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Unattended answer file] Enhancements (Preview 3) #168

Merged
merged 7 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions DISMTools.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@
</Compile>
<Compile Include="ApplicationEvents.vb" />
<Compile Include="Elements\AppxPackage.vb" />
<Compile Include="Elements\AutoUnattend\Components\Component.vb" />
<Compile Include="Elements\AutoUnattend\Components\Pass.vb" />
<Compile Include="Elements\AutoUnattend\DiskConfig\DiskConfiguration.vb" />
<Compile Include="Elements\AutoUnattend\Localization\GeoId.vb" />
<Compile Include="Elements\AutoUnattend\Localization\ImageLanguage.vb" />
Expand Down
85 changes: 85 additions & 0 deletions Elements/AutoUnattend/Component.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?xml version="1.0" ?>
<root>
<Component Id="Microsoft-Windows-Audio-AudioCore" Passes="specialize"/>
<Component Id="Microsoft-Windows-Audio-VolumeControl" Passes="specialize"/>
<Component Id="Microsoft-Windows-Authentication-AuthUI" Passes="specialize"/>
<Component Id="Microsoft-Windows-BLB-WSB-Online-Main" Passes="specialize,oobeSystem"/>
<Component Id="Microsoft-Windows-BrowserService" Passes="generalize"/>
<Component Id="Microsoft-Windows-CodeIntegrity" Passes="offlineServicing"/>
<Component Id="Microsoft-Windows-CoreMmRes" Passes="generalize,specialize,auditSystem,auditUser,oobeSystem"/>
<Component Id="Microsoft-Windows-Deployment" Passes="generalize,specialize,auditSystem,auditUser,oobeSystem"/>
<Component Id="Microsoft-Windows-DeviceAccess" Passes="specialize"/>
<Component Id="Microsoft-Windows-DeviceGuard-Unattend" Passes="offlineServicing"/>
<Component Id="Microsoft-Windows-DiagCpl" Passes="offlineServicing,generalize,specialize"/>
<Component Id="Microsoft-Windows-Disk-Failure-Diagnostic-Module" Passes="offlineServicing,generalize,specialize"/>
<Component Id="Microsoft-Windows-DNS-Client" Passes="specialize"/>
<Component Id="Microsoft-Windows-Embedded-BootExp" Passes="specialize,oobeSystem"/>
<Component Id="Microsoft-Windows-Embedded-EmbeddedLogon" Passes="offlineServicing,specialize"/>
<Component Id="Microsoft-Windows-Embedded-KeyboardFilterService" Passes="offlineServicing"/>
<Component Id="Microsoft-Windows-Embedded-ShellLauncher" Passes="oobeSystem"/>
<Component Id="Microsoft-Windows-Embedded-UnifiedWriteFilter" Passes="specialize"/>
<Component Id="Microsoft-Windows-EnhancedStorage-Adm" Passes="specialize"/>
<Component Id="Microsoft-Windows-ErrorReportingCore" Passes="specialize"/>
<Component Id="Microsoft-Windows-Fax-Service" Passes="specialize"/>
<Component Id="Microsoft-Windows-GPIOButtons" Passes="offlineServicing,specialize"/>
<Component Id="Microsoft-Windows-HelpAndSupport" Passes="specialize,oobeSystem"/>
<Component Id="Microsoft-Windows-IE-ClientNetworkProtocolImplementation" Passes="oobeSystem"/>
<Component Id="Microsoft-Windows-IE-ESC" Passes="specialize"/>
<Component Id="Microsoft-Windows-IE-InternetExplorer" Passes="specialize"/>
<Component Id="Microsoft-Windows-International-Core" Passes="specialize,oobeSystem"/>
<Component Id="Microsoft-Windows-International-Core-WinPE" Passes="windowsPE"/>
<Component Id="Microsoft-Windows-LUA-Settings" Passes="offlineServicing"/>
<Component Id="Microsoft-Windows-MapControl-Desktop" Passes="specialize,oobeSystem"/>
<Component Id="Microsoft-Windows-MediaPlayer-Core" Passes="offlineServicing"/>
<Component Id="Microsoft-Windows-MicrosoftEdgeBrowser" Passes="specialize"/>
<Component Id="Microsoft-Windows-MobilePC-Sensors-API" Passes="specialize"/>
<Component Id="Microsoft-Windows-NetBT" Passes="specialize"/>
<Component Id="Microsoft-Windows-NetworkBridge" Passes="generalize"/>
<Component Id="Microsoft-Windows-NetworkLoadBalancing-Core" Passes="specialize"/>
<Component Id="Microsoft-Windows-OutOfBoxExperience" Passes="generalize,specialize"/>
<Component Id="Microsoft-Windows-PartitionManager" Passes="offlineServicing"/>
<Component Id="Microsoft-Windows-PnpCustomizationsNonWinPE" Passes="offlineServicing,auditSystem"/>
<Component Id="Microsoft-Windows-PnpCustomizationsWinPE" Passes="windowsPE"/>
<Component Id="Microsoft-Windows-PnpSysprep" Passes="generalize,specialize"/>
<Component Id="Microsoft-Windows-PowerCPL" Passes="generalize,specialize"/>
<Component Id="Microsoft-Windows-Printing-Spooler-Core" Passes="specialize"/>
<Component Id="Microsoft-Windows-RasServer" Passes="specialize"/>
<Component Id="Microsoft-Windows-RemoteAssistance-Exe" Passes="specialize"/>
<Component Id="Microsoft-Windows-SecureStartup-FilterDriver" Passes="offlineServicing,specialize,auditSystem,oobeSystem"/>
<Component Id="Microsoft-Windows-Security-SPP" Passes="generalize"/>
<Component Id="Microsoft-Windows-Security-SPP-UX" Passes="specialize"/>
<Component Id="Microsoft-Windows-ServerManager-SvrMgrNc" Passes="generalize,specialize"/>
<Component Id="Microsoft-Windows-Setup" Passes="windowsPE"/>
<Component Id="Microsoft-Windows-SharedAccess" Passes="generalize"/>
<Component Id="Microsoft-Windows-Shell-Setup" Passes="offlineServicing,windowsPE,generalize,specialize,auditSystem,auditUser,oobeSystem"/>
<Component Id="Microsoft-Windows-SHWebSVC" Passes="oobeSystem"/>
<Component Id="Microsoft-Windows-SMBServer" Passes="generalize"/>
<Component Id="Microsoft-Windows-SNMP-Agent-Service" Passes="generalize,specialize"/>
<Component Id="Microsoft-Windows-SQMAPI" Passes="specialize"/>
<Component Id="Microsoft-Windows-STObject" Passes="generalize,specialize"/>
<Component Id="Microsoft-Windows-StorPort-RegistrySettings" Passes="specialize,auditSystem,auditUser,oobeSystem"/>
<Component Id="Microsoft-Windows-SystemMaintenanceService" Passes="specialize"/>
<Component Id="Microsoft-Windows-SystemRestore-Main" Passes="specialize"/>
<Component Id="Microsoft-Windows-SystemSettingsThreshold" Passes="generalize,specialize"/>
<Component Id="Microsoft-Windows-TabletPC-Platform-Input-Core" Passes="offlineServicing,specialize,oobeSystem"/>
<Component Id="Microsoft-Windows-TapiSetup" Passes="specialize"/>
<Component Id="Microsoft-Windows-TCPIP" Passes="windowsPE,specialize"/>
<Component Id="Microsoft-Windows-TerminalServices-CentralPublishing" Passes="oobeSystem"/>
<Component Id="Microsoft-Windows-TerminalServices-LicenseServer" Passes="oobeSystem"/>
<Component Id="Microsoft-Windows-TerminalServices-LocalSessionManager" Passes="offlineServicing,generalize,specialize"/>
<Component Id="Microsoft-Windows-TerminalServices-Publishing-WMIProvider" Passes="offlineServicing,generalize,specialize"/>
<Component Id="Microsoft-Windows-TerminalServices-RDP-WinStationExtensions" Passes="generalize,specialize"/>
<Component Id="Microsoft-Windows-TerminalServices-RemoteConnectionManager" Passes="offlineServicing,generalize,specialize"/>
<Component Id="Microsoft-Windows-Tpm-Tasks" Passes="specialize"/>
<Component Id="Microsoft-Windows-TwinUI" Passes="offlineServicing,specialize,oobeSystem"/>
<Component Id="Microsoft-Windows-UnattendedJoin" Passes="offlineServicing,specialize"/>
<Component Id="Microsoft-Windows-WDF-KernelLibrary" Passes="offlineServicing"/>
<Component Id="Microsoft-Windows-WiFiNetworkManager" Passes="offlineServicing,specialize,oobeSystem"/>
<Component Id="Microsoft-Windows-WinRE-RecoveryAgent" Passes="oobeSystem"/>
<Component Id="Microsoft-Windows-WLANSVC" Passes="offlineServicing,windowsPE,specialize,oobeSystem"/>
<Component Id="Microsoft-Windows-WorkstationService" Passes="generalize,specialize"/>
<Component Id="Microsoft-Windows-WPD-BusEnumService" Passes="specialize"/>
<Component Id="Microsoft-Windows-WWANUI" Passes="generalize,specialize"/>
<Component Id="Networking-MPSSVC-Svc" Passes="specialize"/>
<Component Id="Security-Malware-Windows-Defender" Passes="offlineServicing,specialize,oobeSystem"/>
</root>
59 changes: 59 additions & 0 deletions Elements/AutoUnattend/Components/Component.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
Imports System.Xml.Serialization
Imports System.Xml
Imports System.IO

Namespace Elements

<Serializable(), XmlRoot("Component")>
Public Class Component

<XmlAttribute("Id")>
Public Property Id As String

Public Property Passes As New List(Of Pass)

Public Shared Function LoadItems(filePath As String) As List(Of Component)
Dim componentList As New List(Of Component)
Try
Using fs As FileStream = New FileStream(filePath, FileMode.Open)
Dim xs As New XmlReaderSettings()
xs.IgnoreWhitespace = True
Using reader As XmlReader = XmlReader.Create(fs, xs)
While reader.Read()
If reader.NodeType = XmlNodeType.Element AndAlso reader.Name = "Component" Then
Dim sysComponent As New Component()
sysComponent.Id = reader.GetAttribute("Id")
Dim PassList As String = reader.GetAttribute("Passes")
Dim passListTemp As New List(Of String)
passListTemp = PassList.Split(",").ToList()

Dim knownPasses As New Dictionary(Of String, Boolean)
knownPasses.Add("offlineServicing", False)
knownPasses.Add("windowsPE", False)
knownPasses.Add("generalize", False)
knownPasses.Add("specialize", False)
knownPasses.Add("auditSystem", False)
knownPasses.Add("auditUser", False)
knownPasses.Add("oobeSystem", False)

For Each systemPass In knownPasses.Keys
Dim sysPass As New Pass(systemPass)
sysPass.Compatible = (passListTemp.Contains(systemPass))
sysComponent.Passes.Add(sysPass)
Next
componentList.Add(sysComponent)
End If
End While
End Using
End Using
Return componentList
Catch ex As Exception
If Debugger.IsAttached Then Debugger.Break()
Return Nothing
End Try
Return Nothing
End Function

End Class

End Namespace
18 changes: 18 additions & 0 deletions Elements/AutoUnattend/Components/Pass.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Namespace Elements

Public Class Pass

Public Property Name As String

Public Property Compatible As Boolean

Public Property Enabled As Boolean

Public Sub New(passName As String)
Me.Name = passName
Me.Compatible = False
End Sub

End Class

End Namespace
Binary file modified Installer/Nightly/dt_setup.exe
Binary file not shown.
Loading