Skip to content

Commit

Permalink
DISMTools 0.5.1 Preview 4 (#152)
Browse files Browse the repository at this point in the history
* Update assembly information

* [Component] Update DPS to 3.1.1

* DISMTools Nightly Installer

* [Unattended answer file] Massive overhaul (Preview 4) (#150)

* DISMTools Nightly Installer

* [Unattended answer file] Change WPA3-PSK to WPA3-SAE

I didn't do enough research. Anyway, now it's fixed

* DISMTools Nightly Installer

* [Unattended answer file] Add explanation for "Skip connection"

* [Unattended answer file] Add UnattendGen and finish basics

* DISMTools Nightly Installer

* [Unattended answer file] Polish creation wizard (part 1)

* [Unattended answer file] Polish creation wizard (part 2)

* [Unattended answer file] Polish creation wizard (part 3)

* DISMTools Nightly Installer

* [Unattended answer file] Remove Serbia in accordance to UnattendGen

* [Unattended answer file] Download Self-Contained UnattendGen if necessary (pt. 1)

* DISMTools Nightly Installer

* [Unattended answer file] Remove UnattendGen installer when done

* [Unattended answer file] Remove folders from older implementation

* [Unattended answer file] Perform some final adjustments to creation

* [Unattended answer file] Add basic manager

* [Unattended answer file] Finalize unattended features (Preview 4)

* DISMTools Nightly Installer

---------

Co-authored-by: CodingWonders <[email protected]>

* DISMTools Nightly Installer

* [Unattended answer file] Dispose of panel when not needed

* DISMTools Nightly Installer

* [Unattended answer file] Add option to PE Helper

* DISMTools Nightly Installer

* [Task] Fixed issue in online installation mgmt. mode

* DISMTools Nightly Installer

* [Video] Move to background thread

Fixes #151

* DISMTools Nightly Installer

* [ISO Creator] Modify anchor

* DISMTools Nightly Installer

* [PE Helper] Remove Mandatory property for unattend

* DISMTools Nightly Installer

* [Info Dialog] Fix search for capabilities

* DISMTools Nightly Installer

* [REL] Update What's New section and new Update Info files

* DISMTools Nightly Installer

---------

Co-authored-by: CodingWonders <[email protected]>
  • Loading branch information
CodingWonders and CodingWonders authored Aug 17, 2024
1 parent d650384 commit 59d7fe8
Show file tree
Hide file tree
Showing 288 changed files with 3,686 additions and 2,192 deletions.
123 changes: 96 additions & 27 deletions DISMTools.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@
<Private>True</Private>
</Reference>
<Reference Include="WeifenLuo.WinFormsUI.Docking, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5cded1a1a0a7b481, processorArchitecture=MSIL">
<HintPath>packages\DockPanelSuite.3.1.0\lib\net40\WeifenLuo.WinFormsUI.Docking.dll</HintPath>
<HintPath>packages\DockPanelSuite.3.1.1\lib\net40\WeifenLuo.WinFormsUI.Docking.dll</HintPath>
</Reference>
<Reference Include="WeifenLuo.WinFormsUI.Docking.ThemeVS2012, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5cded1a1a0a7b481, processorArchitecture=MSIL">
<HintPath>packages\DockPanelSuite.ThemeVS2012.3.1.0\lib\net40\WeifenLuo.WinFormsUI.Docking.ThemeVS2012.dll</HintPath>
<HintPath>packages\DockPanelSuite.ThemeVS2012.3.1.1\lib\net40\WeifenLuo.WinFormsUI.Docking.ThemeVS2012.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -570,6 +570,12 @@
<Compile Include="Panels\Img_Ops\Switch\SingleImageIndexError.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Panels\Img_Ops\Unattend\ApplyUnattendFile.Designer.vb">
<DependentUpon>ApplyUnattendFile.vb</DependentUpon>
</Compile>
<Compile Include="Panels\Img_Ops\Unattend\ApplyUnattendFile.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Panels\Img_Ops\WinPE\SetScratchSpace.Designer.vb">
<DependentUpon>SetScratchSpace.vb</DependentUpon>
</Compile>
Expand Down Expand Up @@ -964,6 +970,9 @@
<EmbeddedResource Include="Panels\Img_Ops\Switch\SingleImageIndexError.resx">
<DependentUpon>SingleImageIndexError.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Panels\Img_Ops\Unattend\ApplyUnattendFile.resx">
<DependentUpon>ApplyUnattendFile.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Panels\Img_Ops\WinPE\SetScratchSpace.resx">
<DependentUpon>SetScratchSpace.vb</DependentUpon>
</EmbeddedResource>
Expand Down Expand Up @@ -1138,6 +1147,18 @@
</None>
<None Include="Tools\DT_IEConfig.reg" />
<None Include="Tools\DT_WinADK.reg" />
<None Include="Tools\UnattendGen\win-arm64\publish\UnattendGen.deps.json" />
<None Include="Tools\UnattendGen\win-arm64\publish\UnattendGen.runtimeconfig.json" />
<None Include="Tools\UnattendGen\win-arm64\UnattendGen.deps.json" />
<None Include="Tools\UnattendGen\win-arm64\UnattendGen.runtimeconfig.json" />
<None Include="Tools\UnattendGen\win-x64\publish\UnattendGen.deps.json" />
<None Include="Tools\UnattendGen\win-x64\publish\UnattendGen.runtimeconfig.json" />
<None Include="Tools\UnattendGen\win-x64\UnattendGen.deps.json" />
<None Include="Tools\UnattendGen\win-x64\UnattendGen.runtimeconfig.json" />
<None Include="Tools\UnattendGen\win-x86\publish\UnattendGen.deps.json" />
<None Include="Tools\UnattendGen\win-x86\publish\UnattendGen.runtimeconfig.json" />
<None Include="Tools\UnattendGen\win-x86\UnattendGen.deps.json" />
<None Include="Tools\UnattendGen\win-x86\UnattendGen.runtimeconfig.json" />
</ItemGroup>
<ItemGroup>
<None Include="Panels\readme.md" />
Expand Down Expand Up @@ -1317,6 +1338,73 @@
<Content Include="Installer\ISPPBuiltins.iss" />
<Content Include="Installer\license.txt" />
<Content Include="logo.ico" />
<Content Include="ThemeVS2012\Resources\Dockindicator_PaneDiamond_Hotspot.png" />
<Content Include="ThemeVS2012\Resources\DockIndicator_PaneDiamond_HotspotIndex.png" />
<Content Include="ThemeVS2012\Resources\MaskArrowBottom.png" />
<Content Include="ThemeVS2012\Resources\MaskArrowLeft.png" />
<Content Include="ThemeVS2012\Resources\MaskArrowRight.png" />
<Content Include="ThemeVS2012\Resources\MaskArrowTop.png" />
<Content Include="ThemeVS2012\Resources\MaskCoreBottom.png" />
<Content Include="ThemeVS2012\Resources\MaskCoreCenter.png" />
<Content Include="ThemeVS2012\Resources\MaskCoreLeft.png" />
<Content Include="ThemeVS2012\Resources\MaskCoreRight.png" />
<Content Include="ThemeVS2012\Resources\MaskCoreTop.png" />
<Content Include="ThemeVS2012\Resources\MaskDock.png" />
<Content Include="ThemeVS2012\Resources\MaskDockFive.png" />
<Content Include="ThemeVS2012\Resources\MaskTabClose.png" />
<Content Include="ThemeVS2012\Resources\MaskTabList.png" />
<Content Include="ThemeVS2012\Resources\MaskTabOverflow.png" />
<Content Include="ThemeVS2012\Resources\MaskToolWindowAutoHide.png" />
<Content Include="ThemeVS2012\Resources\MaskToolWindowClose.png" />
<Content Include="ThemeVS2012\Resources\MaskToolWindowDock.png" />
<Content Include="ThemeVS2012\Resources\MaskToolWindowOption.png" />
<Content Include="ThemeVS2012\Resources\MaskWindowBottom.png" />
<Content Include="ThemeVS2012\Resources\MaskWindowCenter.png" />
<Content Include="ThemeVS2012\Resources\MaskWindowLeft.png" />
<Content Include="ThemeVS2012\Resources\MaskWindowRight.png" />
<Content Include="ThemeVS2012\Resources\MaskWindowTop.png" />
<Content Include="Tools\UnattendGen\win-arm64\Library-License.txt" />
<Content Include="Tools\UnattendGen\win-arm64\LICENSE.txt" />
<Content Include="Tools\UnattendGen\win-arm64\Newtonsoft.Json.dll" />
<Content Include="Tools\UnattendGen\win-arm64\publish\Newtonsoft.Json.dll" />
<Content Include="Tools\UnattendGen\win-arm64\publish\UnattendGen.dll" />
<Content Include="Tools\UnattendGen\win-arm64\publish\UnattendGen.exe" />
<Content Include="Tools\UnattendGen\win-arm64\publish\UnattendGen.pdb" />
<Content Include="Tools\UnattendGen\win-arm64\publish\UnattendGenerator.dll" />
<Content Include="Tools\UnattendGen\win-arm64\publish\UnattendGenerator.pdb" />
<Content Include="Tools\UnattendGen\win-arm64\UnattendGen.dll" />
<Content Include="Tools\UnattendGen\win-arm64\UnattendGen.exe" />
<Content Include="Tools\UnattendGen\win-arm64\UnattendGen.pdb" />
<Content Include="Tools\UnattendGen\win-arm64\UnattendGenerator.dll" />
<Content Include="Tools\UnattendGen\win-arm64\UnattendGenerator.pdb" />
<Content Include="Tools\UnattendGen\win-x64\Library-License.txt" />
<Content Include="Tools\UnattendGen\win-x64\LICENSE.txt" />
<Content Include="Tools\UnattendGen\win-x64\Newtonsoft.Json.dll" />
<Content Include="Tools\UnattendGen\win-x64\publish\Newtonsoft.Json.dll" />
<Content Include="Tools\UnattendGen\win-x64\publish\UnattendGen.dll" />
<Content Include="Tools\UnattendGen\win-x64\publish\UnattendGen.exe" />
<Content Include="Tools\UnattendGen\win-x64\publish\UnattendGen.pdb" />
<Content Include="Tools\UnattendGen\win-x64\publish\UnattendGenerator.dll" />
<Content Include="Tools\UnattendGen\win-x64\publish\UnattendGenerator.pdb" />
<Content Include="Tools\UnattendGen\win-x64\UnattendGen.dll" />
<Content Include="Tools\UnattendGen\win-x64\UnattendGen.exe" />
<Content Include="Tools\UnattendGen\win-x64\UnattendGen.pdb" />
<Content Include="Tools\UnattendGen\win-x64\UnattendGenerator.dll" />
<Content Include="Tools\UnattendGen\win-x64\UnattendGenerator.pdb" />
<Content Include="Tools\UnattendGen\win-x86\Library-License.txt" />
<Content Include="Tools\UnattendGen\win-x86\LICENSE.txt" />
<Content Include="Tools\UnattendGen\win-x86\Newtonsoft.Json.dll" />
<Content Include="Tools\UnattendGen\win-x86\publish\Newtonsoft.Json.dll" />
<Content Include="Tools\UnattendGen\win-x86\publish\UnattendGen.dll" />
<Content Include="Tools\UnattendGen\win-x86\publish\UnattendGen.exe" />
<Content Include="Tools\UnattendGen\win-x86\publish\UnattendGen.pdb" />
<Content Include="Tools\UnattendGen\win-x86\publish\UnattendGenerator.dll" />
<Content Include="Tools\UnattendGen\win-x86\publish\UnattendGenerator.pdb" />
<Content Include="Tools\UnattendGen\win-x86\UnattendGen.dll" />
<Content Include="Tools\UnattendGen\win-x86\UnattendGen.exe" />
<Content Include="Tools\UnattendGen\win-x86\UnattendGen.pdb" />
<Content Include="Tools\UnattendGen\win-x86\UnattendGenerator.dll" />
<Content Include="Tools\UnattendGen\win-x86\UnattendGenerator.pdb" />
<None Include="Resources\actions\validation.png" />
<None Include="Resources\setting_migration.ico" />
<None Include="Resources\secprogress_classic.png" />
Expand Down Expand Up @@ -1380,31 +1468,6 @@
<None Include="Resources\progresspanel_logview_shown.png" />
<None Include="Resources\create_iso.png" />
<None Include="Resources\set_layeredkeyboarddriver.png" />
<Content Include="ThemeVS2012\Resources\Dockindicator_PaneDiamond_Hotspot.png" />
<Content Include="ThemeVS2012\Resources\DockIndicator_PaneDiamond_HotspotIndex.png" />
<Content Include="ThemeVS2012\Resources\MaskArrowBottom.png" />
<Content Include="ThemeVS2012\Resources\MaskArrowLeft.png" />
<Content Include="ThemeVS2012\Resources\MaskArrowRight.png" />
<Content Include="ThemeVS2012\Resources\MaskArrowTop.png" />
<Content Include="ThemeVS2012\Resources\MaskCoreBottom.png" />
<Content Include="ThemeVS2012\Resources\MaskCoreCenter.png" />
<Content Include="ThemeVS2012\Resources\MaskCoreLeft.png" />
<Content Include="ThemeVS2012\Resources\MaskCoreRight.png" />
<Content Include="ThemeVS2012\Resources\MaskCoreTop.png" />
<Content Include="ThemeVS2012\Resources\MaskDock.png" />
<Content Include="ThemeVS2012\Resources\MaskDockFive.png" />
<Content Include="ThemeVS2012\Resources\MaskTabClose.png" />
<Content Include="ThemeVS2012\Resources\MaskTabList.png" />
<Content Include="ThemeVS2012\Resources\MaskTabOverflow.png" />
<Content Include="ThemeVS2012\Resources\MaskToolWindowAutoHide.png" />
<Content Include="ThemeVS2012\Resources\MaskToolWindowClose.png" />
<Content Include="ThemeVS2012\Resources\MaskToolWindowDock.png" />
<Content Include="ThemeVS2012\Resources\MaskToolWindowOption.png" />
<Content Include="ThemeVS2012\Resources\MaskWindowBottom.png" />
<Content Include="ThemeVS2012\Resources\MaskWindowCenter.png" />
<Content Include="ThemeVS2012\Resources\MaskWindowLeft.png" />
<Content Include="ThemeVS2012\Resources\MaskWindowRight.png" />
<Content Include="ThemeVS2012\Resources\MaskWindowTop.png" />
<None Include="Resources\startup\version.png" />
<None Include="Resources\startup\preview_flag.png" />
<None Include="Resources\startup\startup_bg.png" />
Expand Down Expand Up @@ -1726,6 +1789,12 @@ IF EXIST "$(SolutionDir)Tools\UnpEax\bin\Debug\UnpEax.exe" (
copy /y "$(SolutionDir)Tools\UnpEax\bin\Debug\UnpEax.exe" "Tools\UnpEax\UnpEax.exe"
)

:: Copy UnattendGen
IF EXIST "$(SolutionDir)Tools\UnattendGen" (
md "Tools\UnattendGen"
xcopy "$(SolutionDir)Tools\UnattendGen\*" "Tools\UnattendGen" /cehyi
)

IF NOT EXIST AutoUnattend (
md AutoUnattend
copy /y "$(SolutionDir)Elements\AutoUnattend\*.xml" AutoUnattend
Expand Down
1 change: 0 additions & 1 deletion Elements/AutoUnattend/GeoId.xml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@
<GeoId Id="261" DisplayName="Yemen"/>
<GeoId Id="263" DisplayName="Zambia"/>
<GeoId Id="264" DisplayName="Zimbabwe"/>
<GeoId Id="269" DisplayName="Serbia"/>
<GeoId Id="270" DisplayName="Montenegro"/>
<GeoId Id="271" DisplayName="Serbia"/>
<GeoId Id="273" DisplayName="Curaçao"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
Public Enum WiFiAuthenticationMode As Integer
Open = 0
WPA2_PSK = 1
WPA3_PSK = 2
WPA3_SAE = 2
End Enum

Public Class WirelessValidator
Expand Down
4 changes: 2 additions & 2 deletions Elements/AutoUnattend/UnattendedWizardPage.vb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Public Class UnattendedWizardPage

Public Enum Page As Integer
DisclaimerPage = 0
WelcomePage = 0
RegionalPage = 1
SysConfigPage = 2
TimeZonePage = 3
Expand All @@ -24,7 +24,7 @@

Public Property WizardPage As Page

Public Const PageCount As Integer = 15
Public Const PageCount As Integer = 17
End Class

End Namespace
29 changes: 28 additions & 1 deletion Elements/KeyboardDrivers.vb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,34 @@ Namespace Elements
End Set
End Property

Public Shared Function GetKeyboardDriver(mountDir As String) As LayeredKeyboardDriver
Public Shared Function GetKeyboardDriver(mountDir As String, Optional onlineMode As Boolean = False) As LayeredKeyboardDriver
If onlineMode Then
Try
' Grab override keyboard type from registry
Dim OverrideKeybReg As RegistryKey = Registry.LocalMachine.OpenSubKey("SYSTEM\CurrentControlSet\Services\i8042prt\Parameters", False)
Dim OverrideKeybID As String = OverrideKeybReg.GetValue("OverrideKeyboardIdentifier")
OverrideKeybReg.Close()
' Check keyboard ID
Select Case OverrideKeybID
Case "PCAT_101KEY"
Return LayeredKeyboardDriver.PCATKey
Case "PCAT_101AKEY"
Return LayeredKeyboardDriver.K_PCATKeyT1
Case "PCAT_101BKEY"
Return LayeredKeyboardDriver.K_PCATKeyT2
Case "PCAT_101CKEY"
Return LayeredKeyboardDriver.K_PCATKeyT3
Case "PCAT_103KEY"
Return LayeredKeyboardDriver.K_103106Key
Case "PCAT_106KEY"
Return LayeredKeyboardDriver.J_106109Key
End Select
Catch ex As Exception
MessageBox.Show(ex.Message)
Return LayeredKeyboardDriver.Unknown
End Try
Return LayeredKeyboardDriver.Unknown
End If
If (mountDir <> "") AndAlso (Directory.Exists(mountDir)) Then
Try
' Load the registry key
Expand Down
27 changes: 25 additions & 2 deletions Helpers/extps1/PE_Helper/PE_Helper.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ param (
[Parameter(ParameterSetName = 'StartPEGen', Mandatory = $true, Position = 1)] [string] $arch,
[Parameter(ParameterSetName = 'StartPEGen', Mandatory = $true, Position = 2)] [string] $imgFile,
[Parameter(ParameterSetName = 'StartPEGen', Mandatory = $true, Position = 3)] [string] $isoPath,
[Parameter(ParameterSetName = 'StartPEGen', Position = 4)] [string] $unattendFile,
[Parameter(ParameterSetName = 'StartDevelopment', Mandatory = $true, Position = 1)] [string] $testArch,
[Parameter(ParameterSetName = 'StartDevelopment', Mandatory = $true, Position = 2)] [string] $targetPath
)
Expand Down Expand Up @@ -174,6 +175,11 @@ function Start-PEGeneration
Copy-Item -Path "$((Get-Location).Path)\files\diskpart\*.dp" -Destination "$((Get-Location).Path)\ISOTEMP\media\files\diskpart" -Verbose -Force -Recurse -Container -ErrorAction SilentlyContinue
New-Item -Path "$((Get-Location).Path)\ISOTEMP\media\Tools\DIM" -ItemType Directory | Out-Null
Copy-Item -Path "$((Get-Location).Path)\tools\DIM\*" -Destination "$((Get-Location).Path)\ISOTEMP\media\Tools\DIM" -Verbose -Force -Recurse -Container -ErrorAction SilentlyContinue
if (($unattendFile -ne "") -and (Test-Path "$unattendFile" -PathType Leaf))
{
Write-Host "Unattended answer file has been detected. Copying to ISO file..."
Copy-Item -Path "$unattendFile" -Destination "$((Get-Location).Path)\ISOTEMP\media\unattend.xml" -Verbose -Force -Recurse -Container -ErrorAction SilentlyContinue
}
Write-Host "Deleting temporary files..."
Remove-Item -Path "$((Get-Location).Path)\ISOTEMP\OCs" -Recurse -Force -ErrorAction SilentlyContinue
if ($?)
Expand Down Expand Up @@ -715,6 +721,18 @@ function Start-OSApplication
Write-Host "Failed to apply the Windows image."
}
if ($serviceableArchitecture) { Set-Serviceability -ImagePath "$($driveLetter):\" } else { Write-Host "Serviceability tests will not be run: the image architecture and the PE architecture are different." }
if (Test-Path "$((Get-Location).Path)\unattend.xml" -PathType Leaf)
{
Write-Host "A possible unattended answer file has been detected, applying it... " -NoNewline
if ((Start-DismCommand -Verb UnattendApply -ImagePath "$($driveLetter):\" -unattendPath "$((Get-Location).Path)\unattend.xml") -eq $true)
{
Write-Host "SUCCESS" -ForegroundColor White -BackgroundColor DarkGreen
}
else
{
Write-Host "FAILURE" -ForegroundColor Black -BackgroundColor DarkRed
}
}
$driverPath = "$([IO.Path]::GetPathRoot([Environment]::GetFolderPath([Environment+SpecialFolder]::Windows)))DT_InstDrvs.txt"
if ((Test-Path "$($driveLetter):\`$DISMTOOLS.~LS") -and ($serviceableArchitecture) -and (Test-Path -Path $driverPath -PathType Leaf))
{
Expand Down Expand Up @@ -1080,7 +1098,7 @@ function Start-DismCommand
#>
[CmdletBinding(DefaultParameterSetName='Default')]
param (
[Parameter(Mandatory = $true, Position=0)] [ValidateSet('Mount', 'Commit', 'Unmount', 'Apply', 'Add-Package', 'Remove-Package', 'Enable-Feature', 'Disable-Feature', 'Add-Appx', 'Remove-Appx', 'Add-Capability', 'Remove-Capability', 'Add-Driver')] [string] $Verb,
[Parameter(Mandatory = $true, Position=0)] [ValidateSet('Mount', 'Commit', 'Unmount', 'Apply', 'Add-Package', 'Remove-Package', 'Enable-Feature', 'Disable-Feature', 'Add-Appx', 'Remove-Appx', 'Add-Capability', 'Remove-Capability', 'Add-Driver', 'UnattendApply')] [string] $Verb,
[Parameter(Mandatory = $true, Position=1)] [string] $ImagePath,
# Parameters for mount command
[Parameter(ParameterSetName='Mount', Mandatory = $true, Position = 2)] [int] $ImageIndex,
Expand Down Expand Up @@ -1114,7 +1132,9 @@ function Start-DismCommand
[Parameter(ParameterSetName='Remove-Capability', Mandatory = $true, Position=2)] [string] $CapabilityRemovalName,
# Parameters for driver addition
[Parameter(ParameterSetName='Add-Driver', Mandatory = $true, Position=2)] [string] $DriverAdditionFile,
[Parameter(ParameterSetName='Add-Driver', Mandatory = $true, Position=3)] [bool] $DriverAdditionRecurse
[Parameter(ParameterSetName='Add-Driver', Mandatory = $true, Position=3)] [bool] $DriverAdditionRecurse,
# Parameters for unattended answer file application
[Parameter(ParameterSetName='UnattendApply', Mandatory = $true, Position=2)] [string] $unattendPath
)
try
{
Expand Down Expand Up @@ -1209,6 +1229,9 @@ function Start-DismCommand
}
}
}
"UnattendApply" {
Apply-WindowsUnattend -Path "$ImagePath" -UnattendPath "$unattendPath" -NoRestart
}
default {

}
Expand Down
Binary file modified Installer/Nightly/dt_setup.exe
Binary file not shown.
Loading

0 comments on commit 59d7fe8

Please sign in to comment.