Skip to content

Commit dde1413

Browse files
DISMTools 0.6.1 Update 1 (#235)
* [Installer] Update Inno Setup to 6.4.1 * Update assembly information * [Fix] Control window resize events * [Fix] Skip second scan of main package from appinstaller * [PE Helper] Improvements, lots of improvements - Add SecureStartup and EnhancedStorage OCs to PE images, mainly to deal with BitLocker-encrypted drives - Improved output of package addition and OC copy * [PE Helper] Add Arm64EC compatibility * [PE Helper] Add experimental ARM64 builds of DIM * [PE Helper] Official ARM64 support for DIM The ARM64 build of the Driver Installation Module (DIM) works without any problems on a Raspberry Pi. This officially introduces support for that architecture on the PE Helper when it creates the ISO files. The Arm64EC version is removed because of 2 reasons: 1. It didn't work 2. It isn't necessary, since we don't have to slowly convert the AMD64 native code to ARM64 and have an in-between version However, ARM64 Windows PEs will still have support for Arm64EC, for **your** applications (you will have to target them to this platform first) An additional note is that, in order to fully experience the DIM in the ARM64 DISMTools PE, you will have to start ISO creation from within an ARM64 system (so use your Copilot+ PCs with Recall and other stuff no one asked, or Project Volterra, or your Lumia phone, or your Android phone... WoA is everywhere! When will it arrive to iPhones, though?) * [Enhance] Added support for installations in removable media * [PE Helper] Add status label to DIM * [Fix] Fixed product key validation algo * [PE Helper] ARM64 restart dialog * [Updater] Change location of update files * [Unattended answer file] Update UnattendGen, disable password on open network connections * [Unattended answer file] Fixed access violation exception * [REL] Update What's New section, and Update Info files
1 parent 1a568ed commit dde1413

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+447
-214
lines changed

DISMTools.sln

+34
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,25 @@ EndProject
1717
Global
1818
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1919
Debug|Any CPU = Debug|Any CPU
20+
Debug|ARM64 = Debug|ARM64
21+
Debug|ARM64EC = Debug|ARM64EC
2022
Debug|Mixed Platforms = Debug|Mixed Platforms
2123
Debug|Win32 = Debug|Win32
2224
Debug|x64 = Debug|x64
2325
Release|Any CPU = Release|Any CPU
26+
Release|ARM64 = Release|ARM64
27+
Release|ARM64EC = Release|ARM64EC
2428
Release|Mixed Platforms = Release|Mixed Platforms
2529
Release|Win32 = Release|Win32
2630
Release|x64 = Release|x64
2731
EndGlobalSection
2832
GlobalSection(ProjectConfigurationPlatforms) = postSolution
2933
{042ED465-C910-407A-93D1-736639FF0EA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
3034
{042ED465-C910-407A-93D1-736639FF0EA5}.Debug|Any CPU.Build.0 = Debug|Any CPU
35+
{042ED465-C910-407A-93D1-736639FF0EA5}.Debug|ARM64.ActiveCfg = Debug|Any CPU
36+
{042ED465-C910-407A-93D1-736639FF0EA5}.Debug|ARM64.Build.0 = Debug|Any CPU
37+
{042ED465-C910-407A-93D1-736639FF0EA5}.Debug|ARM64EC.ActiveCfg = Debug|Any CPU
38+
{042ED465-C910-407A-93D1-736639FF0EA5}.Debug|ARM64EC.Build.0 = Debug|Any CPU
3139
{042ED465-C910-407A-93D1-736639FF0EA5}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
3240
{042ED465-C910-407A-93D1-736639FF0EA5}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
3341
{042ED465-C910-407A-93D1-736639FF0EA5}.Debug|Win32.ActiveCfg = Debug|Any CPU
@@ -36,6 +44,10 @@ Global
3644
{042ED465-C910-407A-93D1-736639FF0EA5}.Debug|x64.Build.0 = Debug|Any CPU
3745
{042ED465-C910-407A-93D1-736639FF0EA5}.Release|Any CPU.ActiveCfg = Release|Any CPU
3846
{042ED465-C910-407A-93D1-736639FF0EA5}.Release|Any CPU.Build.0 = Release|Any CPU
47+
{042ED465-C910-407A-93D1-736639FF0EA5}.Release|ARM64.ActiveCfg = Release|Any CPU
48+
{042ED465-C910-407A-93D1-736639FF0EA5}.Release|ARM64.Build.0 = Release|Any CPU
49+
{042ED465-C910-407A-93D1-736639FF0EA5}.Release|ARM64EC.ActiveCfg = Release|Any CPU
50+
{042ED465-C910-407A-93D1-736639FF0EA5}.Release|ARM64EC.Build.0 = Release|Any CPU
3951
{042ED465-C910-407A-93D1-736639FF0EA5}.Release|Mixed Platforms.ActiveCfg = Release|x86
4052
{042ED465-C910-407A-93D1-736639FF0EA5}.Release|Mixed Platforms.Build.0 = Release|x86
4153
{042ED465-C910-407A-93D1-736639FF0EA5}.Release|Win32.ActiveCfg = Release|x86
@@ -44,36 +56,58 @@ Global
4456
{042ED465-C910-407A-93D1-736639FF0EA5}.Release|x64.Build.0 = Release|x64
4557
{C084B601-F395-47D3-9E66-C0582139DCF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
4658
{C084B601-F395-47D3-9E66-C0582139DCF4}.Debug|Any CPU.Build.0 = Debug|Any CPU
59+
{C084B601-F395-47D3-9E66-C0582139DCF4}.Debug|ARM64.ActiveCfg = Debug|Any CPU
60+
{C084B601-F395-47D3-9E66-C0582139DCF4}.Debug|ARM64.Build.0 = Debug|Any CPU
61+
{C084B601-F395-47D3-9E66-C0582139DCF4}.Debug|ARM64EC.ActiveCfg = Debug|Any CPU
62+
{C084B601-F395-47D3-9E66-C0582139DCF4}.Debug|ARM64EC.Build.0 = Debug|Any CPU
4763
{C084B601-F395-47D3-9E66-C0582139DCF4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
4864
{C084B601-F395-47D3-9E66-C0582139DCF4}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
4965
{C084B601-F395-47D3-9E66-C0582139DCF4}.Debug|Win32.ActiveCfg = Debug|Any CPU
5066
{C084B601-F395-47D3-9E66-C0582139DCF4}.Debug|x64.ActiveCfg = Debug|Any CPU
5167
{C084B601-F395-47D3-9E66-C0582139DCF4}.Release|Any CPU.ActiveCfg = Release|Any CPU
5268
{C084B601-F395-47D3-9E66-C0582139DCF4}.Release|Any CPU.Build.0 = Release|Any CPU
69+
{C084B601-F395-47D3-9E66-C0582139DCF4}.Release|ARM64.ActiveCfg = Release|Any CPU
70+
{C084B601-F395-47D3-9E66-C0582139DCF4}.Release|ARM64.Build.0 = Release|Any CPU
71+
{C084B601-F395-47D3-9E66-C0582139DCF4}.Release|ARM64EC.ActiveCfg = Release|Any CPU
72+
{C084B601-F395-47D3-9E66-C0582139DCF4}.Release|ARM64EC.Build.0 = Release|Any CPU
5373
{C084B601-F395-47D3-9E66-C0582139DCF4}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
5474
{C084B601-F395-47D3-9E66-C0582139DCF4}.Release|Mixed Platforms.Build.0 = Release|Any CPU
5575
{C084B601-F395-47D3-9E66-C0582139DCF4}.Release|Win32.ActiveCfg = Release|Any CPU
5676
{C084B601-F395-47D3-9E66-C0582139DCF4}.Release|x64.ActiveCfg = Release|Any CPU
5777
{5330BC3F-1BFF-4200-8872-3A2236F814AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
5878
{5330BC3F-1BFF-4200-8872-3A2236F814AB}.Debug|Any CPU.Build.0 = Debug|Any CPU
79+
{5330BC3F-1BFF-4200-8872-3A2236F814AB}.Debug|ARM64.ActiveCfg = Debug|Any CPU
80+
{5330BC3F-1BFF-4200-8872-3A2236F814AB}.Debug|ARM64.Build.0 = Debug|Any CPU
81+
{5330BC3F-1BFF-4200-8872-3A2236F814AB}.Debug|ARM64EC.ActiveCfg = Debug|Any CPU
82+
{5330BC3F-1BFF-4200-8872-3A2236F814AB}.Debug|ARM64EC.Build.0 = Debug|Any CPU
5983
{5330BC3F-1BFF-4200-8872-3A2236F814AB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
6084
{5330BC3F-1BFF-4200-8872-3A2236F814AB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
6185
{5330BC3F-1BFF-4200-8872-3A2236F814AB}.Debug|Win32.ActiveCfg = Debug|Any CPU
6286
{5330BC3F-1BFF-4200-8872-3A2236F814AB}.Debug|x64.ActiveCfg = Debug|Any CPU
6387
{5330BC3F-1BFF-4200-8872-3A2236F814AB}.Release|Any CPU.ActiveCfg = Release|Any CPU
6488
{5330BC3F-1BFF-4200-8872-3A2236F814AB}.Release|Any CPU.Build.0 = Release|Any CPU
89+
{5330BC3F-1BFF-4200-8872-3A2236F814AB}.Release|ARM64.ActiveCfg = Release|Any CPU
90+
{5330BC3F-1BFF-4200-8872-3A2236F814AB}.Release|ARM64.Build.0 = Release|Any CPU
91+
{5330BC3F-1BFF-4200-8872-3A2236F814AB}.Release|ARM64EC.ActiveCfg = Release|Any CPU
92+
{5330BC3F-1BFF-4200-8872-3A2236F814AB}.Release|ARM64EC.Build.0 = Release|Any CPU
6593
{5330BC3F-1BFF-4200-8872-3A2236F814AB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
6694
{5330BC3F-1BFF-4200-8872-3A2236F814AB}.Release|Mixed Platforms.Build.0 = Release|Any CPU
6795
{5330BC3F-1BFF-4200-8872-3A2236F814AB}.Release|Win32.ActiveCfg = Release|Any CPU
6896
{5330BC3F-1BFF-4200-8872-3A2236F814AB}.Release|x64.ActiveCfg = Release|Any CPU
6997
{ADFA0CB4-E66F-4956-937E-1B2C4AAF3092}.Debug|Any CPU.ActiveCfg = Debug|Win32
98+
{ADFA0CB4-E66F-4956-937E-1B2C4AAF3092}.Debug|ARM64.ActiveCfg = Debug|Win32
99+
{ADFA0CB4-E66F-4956-937E-1B2C4AAF3092}.Debug|ARM64.Build.0 = Debug|Win32
100+
{ADFA0CB4-E66F-4956-937E-1B2C4AAF3092}.Debug|ARM64EC.ActiveCfg = Debug|Win32
101+
{ADFA0CB4-E66F-4956-937E-1B2C4AAF3092}.Debug|ARM64EC.Build.0 = Debug|Win32
70102
{ADFA0CB4-E66F-4956-937E-1B2C4AAF3092}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
71103
{ADFA0CB4-E66F-4956-937E-1B2C4AAF3092}.Debug|Mixed Platforms.Build.0 = Debug|Win32
72104
{ADFA0CB4-E66F-4956-937E-1B2C4AAF3092}.Debug|Win32.ActiveCfg = Debug|Win32
73105
{ADFA0CB4-E66F-4956-937E-1B2C4AAF3092}.Debug|Win32.Build.0 = Debug|Win32
74106
{ADFA0CB4-E66F-4956-937E-1B2C4AAF3092}.Debug|x64.ActiveCfg = Debug|x64
75107
{ADFA0CB4-E66F-4956-937E-1B2C4AAF3092}.Debug|x64.Build.0 = Debug|x64
76108
{ADFA0CB4-E66F-4956-937E-1B2C4AAF3092}.Release|Any CPU.ActiveCfg = Release|Win32
109+
{ADFA0CB4-E66F-4956-937E-1B2C4AAF3092}.Release|ARM64.ActiveCfg = Release|Win32
110+
{ADFA0CB4-E66F-4956-937E-1B2C4AAF3092}.Release|ARM64EC.ActiveCfg = Release|Win32
77111
{ADFA0CB4-E66F-4956-937E-1B2C4AAF3092}.Release|Mixed Platforms.ActiveCfg = Release|Win32
78112
{ADFA0CB4-E66F-4956-937E-1B2C4AAF3092}.Release|Mixed Platforms.Build.0 = Release|Win32
79113
{ADFA0CB4-E66F-4956-937E-1B2C4AAF3092}.Release|Win32.ActiveCfg = Release|Win32

DISMTools.vbproj

+6
Original file line numberDiff line numberDiff line change
@@ -1444,12 +1444,18 @@
14441444
<Content Include="Helpers\extps1\PE_Helper\files\README1ST.TXT">
14451445
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
14461446
</Content>
1447+
<Content Include="Helpers\extps1\PE_Helper\tools\DIM\aarch64\DT-DIM.exe">
1448+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
1449+
</Content>
14471450
<Content Include="Helpers\extps1\PE_Helper\tools\DIM\amd64\DT-DIM.exe">
14481451
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
14491452
</Content>
14501453
<Content Include="Helpers\extps1\PE_Helper\tools\DIM\i386\DT-DIM.exe">
14511454
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
14521455
</Content>
1456+
<Content Include="Helpers\extps1\PE_Helper\tools\RestartDialog\aarch64\DTPE-RestartDialog.exe">
1457+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
1458+
</Content>
14531459
<Content Include="Helpers\extps1\PE_Helper\tools\RestartDialog\amd64\DTPE-RestartDialog.exe">
14541460
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
14551461
</Content>

Elements/AutoUnattend/ProductKey/ProductKey.vb

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ Namespace Elements
2828
Public Shared Function ValidateProductKey(key As String) As ProductKey
2929
DynaLog.LogMessage("Validating product key " & Quote & key & Quote & "...")
3030
Dim pKey As New ProductKey()
31-
If Regex.Match(key, "^([2346789BCDFGHJKMPQRTVWXY]{5}-){4}[2346789BCDFGHJKMPQRTVWXY]{5}$").Value <> "" Then
32-
DynaLog.LogMessage("Regex match completed and returned values. Key is valid in syntax.")
31+
If Regex.IsMatch(key, "^([A-Z0-9]{5}-){4}[A-Z0-9]{5}$") Then
32+
DynaLog.LogMessage("Regex has matches. Key is valid in syntax.")
3333
pKey.Valid = True
3434
pKey.Key = key
3535
Else
36-
DynaLog.LogMessage("Regex match completed but didn't return any values. Key is invalid in syntax.")
36+
DynaLog.LogMessage("Regex does not have matches. Key is invalid in syntax.")
3737
pKey.Valid = False
3838
pKey.Key = ""
3939
End If

Helpers/extps1/PE_Helper/PE_Helper.ps1

+38-12
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,27 @@ function Start-PEGeneration
176176
$pkgs.Add("$((Get-Location).Path)\ISOTEMP\OCs\en-US\WinPE-PowerShell_en-us.cab")
177177
$pkgs.Add("$((Get-Location).Path)\ISOTEMP\OCs\WinPE-DismCmdlets.cab")
178178
$pkgs.Add("$((Get-Location).Path)\ISOTEMP\OCs\en-US\WinPE-DismCmdlets_en-us.cab")
179+
$pkgs.Add("$((Get-Location).Path)\ISOTEMP\OCs\WinPE-SecureStartup.cab")
180+
$pkgs.Add("$((Get-Location).Path)\ISOTEMP\OCs\en-US\WinPE-SecureStartup_en-us.cab")
181+
$pkgs.Add("$((Get-Location).Path)\ISOTEMP\OCs\WinPE-EnhancedStorage.cab")
182+
$pkgs.Add("$((Get-Location).Path)\ISOTEMP\OCs\en-US\WinPE-EnhancedStorage_en-us.cab")
183+
# Add ARM64EC packages
184+
if ($architecture -eq 'arm64') {
185+
$pkgs.Add("$((Get-Location).Path)\ISOTEMP\OCs\WinPE-x64-Support.cab")
186+
$pkgs.Add("$((Get-Location).Path)\ISOTEMP\OCs\en-US\WinPE-x64-Support_en-us.cab")
187+
}
188+
$pkgCount = $pkgs.Count
189+
$curPkgIndex = 0
179190
foreach ($pkg in $pkgs)
180191
{
192+
$curPkgIndex = $pkgs.IndexOf($pkg)
193+
Write-Progress -Activity "Adding OS packages..." -Status "Adding OS package $($curPkgIndex + 1) of $($pkgCount): `"$([IO.Path]::GetFileNameWithoutExtension($pkg))`"..." -PercentComplete (($curPkgIndex / $pkgCount) * 100)
181194
if (Test-Path $pkg -PathType Leaf)
182195
{
183-
Write-Host "Adding OS package $([IO.Path]::GetFileNameWithoutExtension($pkg))..."
184196
Start-DismCommand -Verb Add-Package -ImagePath "$mountDirectory" -PackagePath $pkg | Out-Null
185197
}
186198
}
199+
Write-Progress -Activity "Adding OS packages..." -Completed
187200
Write-Host "Saving changes..."
188201
Start-DismCommand -Verb Commit -ImagePath "$mountDirectory" | Out-Null
189202
# Perform customization tasks later
@@ -422,20 +435,27 @@ function Copy-PEComponents
422435
$loc_OCs = Get-ChildItem -Path "$peToolsPath\$($architecture.ToString())\WinPE_OCs\en-US" -File
423436
$copied = 0
424437
$totalSize = 1
438+
439+
$OC_Count = $general_OCs.Count
440+
$OC_CurrentIndex = 0
425441
foreach ($file in $general_OCs)
426442
{
427-
Copy-Item -Path "$peToolsPath\$($architecture.ToString())\WinPE_OCs\$($file.Name)" -Destination "$targetDir\OCs" -Force -Container -PassThru -Verbose | ForEach-Object {
428-
$copied = ($_.BytesTransferred / $totalSize) * 100
429-
Write-Debug $copied
430-
}
443+
$OC_CurrentIndex = $general_OCs.IndexOf($file)
444+
Write-Progress -Activity "Copying language-neutral Optional Components..." -Status "Copying Optional Component package $($OC_CurrentIndex + 1) of $($OC_Count)..." -PercentComplete (($OC_CurrentIndex / $OC_Count) * 100)
445+
Copy-Item -Path "$peToolsPath\$($architecture.ToString())\WinPE_OCs\$($file.Name)" -Destination "$targetDir\OCs" -Force
431446
}
447+
Write-Progress -Activity "Copying language-neutral Optional Components..." -Completed
448+
449+
# Reset counters and begin counting again
450+
$OC_Count = $loc_OCs.Count
451+
$OC_CurrentIndex = 0
432452
foreach ($file in $loc_OCs)
433453
{
434-
Copy-Item -Path "$peToolsPath\$($architecture.ToString())\WinPE_OCs\en-US\$($file.Name)" -Destination "$targetDir\OCs\en-US" -Force -Container -PassThru -Verbose | ForEach-Object {
435-
$copied = ($_.BytesTransferred / $totalSize) * 100
436-
Write-Debug $copied
437-
}
454+
$OC_CurrentIndex = $loc_OCs.IndexOf($file)
455+
Write-Progress -Activity "Copying language-specific Optional Components..." -Status "Copying Optional Component package $($OC_CurrentIndex + 1) of $($OC_Count) for English (United States)..." -PercentComplete (($OC_CurrentIndex / $OC_Count) * 100)
456+
Copy-Item -Path "$peToolsPath\$($architecture.ToString())\WinPE_OCs\en-US\$($file.Name)" -Destination "$targetDir\OCs\en-US" -Force
438457
}
458+
Write-Progress -Activity "Copying language-specific Optional Components..." -Completed
439459
Write-Host "PE components have been copied successfully."
440460
return $true
441461
}
@@ -523,7 +543,11 @@ function Start-PECustomization
523543
{
524544
Write-Host "Could not modify terminal settings"
525545
}
526-
if (($arch.ToString() -eq "x86") -or ($arch.ToString() -eq "amd64"))
546+
$supportedArchitectures = [List[string]]::new()
547+
$supportedArchitectures.Add("x86")
548+
$supportedArchitectures.Add("amd64")
549+
$supportedArchitectures.Add("arm64")
550+
if ($supportedArchitectures.Contains($arch.ToString()))
527551
{
528552
try
529553
{
@@ -562,7 +586,7 @@ function Start-PECustomization
562586
x86 {
563587
Copy-Item -Path "\Windows\system32\ExplorerFrame.dll" -Destination "$imagePath\Windows\system32" -Force -Verbose
564588
}
565-
amd64 {
589+
{($arch -eq 'amd64') -or ($arch -eq 'arm64')} {
566590
Copy-Item -Path "\Windows\system32\ExplorerFrame.dll" -Destination "$imagePath\Windows\system32" -Force -Verbose
567591
Copy-Item -Path "\Windows\SysWOW64\ExplorerFrame.dll" -Destination "$imagePath\Windows\SysWOW64" -Force -Verbose
568592
}
@@ -966,6 +990,7 @@ function Start-OSApplication
966990
$supportedArchitectures = [List[string]]::new()
967991
$supportedArchitectures.Add("i386")
968992
$supportedArchitectures.Add("amd64")
993+
$supportedArchitectures.Add("aarch64")
969994
$systemArchitecture = Get-SystemArchitecture
970995

971996
if ($supportedArchitectures.Contains($systemArchitecture))
@@ -1017,7 +1042,7 @@ function Get-SystemArchitecture
10171042
return "amd64"
10181043
}
10191044
"12" {
1020-
return "arm64"
1045+
return "aarch64"
10211046
}
10221047
default {
10231048
return ""
@@ -1067,6 +1092,7 @@ function Get-Disks
10671092
$supportedArchitectures = [List[string]]::new()
10681093
$supportedArchitectures.Add("i386")
10691094
$supportedArchitectures.Add("amd64")
1095+
$supportedArchitectures.Add("aarch64")
10701096
$systemArchitecture = Get-SystemArchitecture
10711097

10721098
if ($supportedArchitectures.Contains($systemArchitecture))

Helpers/extps1/PE_Helper/files/dim_start/dimstart.bat

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ for %%D in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
1515
"%sysdrive%\Tools\DIM\i386\DT-DIM.exe"
1616
) else if "%PROCESSOR_ARCHITECTURE%" equ "AMD64" (
1717
"%sysdrive%\Tools\DIM\amd64\DT-DIM.exe"
18+
) else if "%PROCESSOR_ARCHITECTURE%" equ "ARM64" (
19+
"%sysdrive%\Tools\DIM\aarch64\DT-DIM.exe"
1820
)
1921
exit
2022
)
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)