Skip to content

Commit 659b3bd

Browse files
DISMTools 0.6.1 Preview 3 (#216)
* Update assembly information * [PE Helper] Update HotInstall (01/25/2025) Updated HotInstall to its latest commit: CodingWonders/DT-HotInstall@6e87e16 * [Updater] Add error information * [PE Helper] Update HotInstall (01/25/2025, part 2) Updated HotInstall to its latest commit: CodingWonders/DT-HotInstall@af626ff * [Unattended answer file] Block "None" user account name * [PE Helper] Detect if image index is valid * [PE Helper] Add support for Ventoy drives * [ISO Creator] Remove redundant label * [PE Helper] Update HotInstall (01/29/2025) Update HotInstall to its latest commit: CodingWonders/DT-HotInstall@43ce929 NOTE: this adds language support to HotInstall for the following languages, based on ISO 639-2 language code representations: English, Spanish (Spain). Unsupported languages will default to English for the HotInstall installer * [PE Helper] Update HotInstall (01/30/2025) Update HotInstall to its latest commit: CodingWonders/DT-HotInstall@f5df6f0 * [PE Helper] Update HotInstall (01/31/2025) Update HotInstall to its latest commit: CodingWonders/DT-HotInstall@e603158 * [Unattended answer file] UnattendGen Nightly * [Fix] Switch to manual size for label * [Build] Remove dependency for speedier CI * [Build] Remove dependency for speedier CI (part 2) * [Enhance] Make progress panel log switchers more appealing * [PE Helper] Show visual progress of DIM driver addition * [PE Helper] Hide progress once completed * [PE Helper] Hide progress once completed (part 2) * [PE Helper] Change progress output of driver installation * [PE Helper] Update HotInstall (02/02/2025) Update HotInstall to its latest commit: CodingWonders/DT-HotInstall@d843f50 * [PE Helper] Update HotInstall (02/02/2025, part 2) Update HotInstall to its latest commit: CodingWonders/DT-HotInstall@bc05ccd * [DynaLog] Change file length type to long * [ISO Creator] Detect ADKs and WIMs for architectures * [PE Helper] Fix compat issues with ADK 10.0.26100.2454+ * [PE Helper] Add option for signed boot binaries * [Library] Update Scintilla.NET to 5.6.6 * [Unattended answer file & PE Helper] Update vers. - Updated UnattendGen (v0.6.1.2521) - Updated HotInstall to remove test build flag * [REL] Update What's New section, new Update Info files
1 parent 74db47b commit 659b3bd

Some content is hidden

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

50 files changed

+325
-135
lines changed

.github/workflows/create-nightly-installer.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ jobs:
3333
$projectDir = "$((Get-Location).Path)\"
3434
$targetDir = (Get-Location).Path + "\bin\Debug\"
3535
iex "$($solutionDir)CheckMissingDlls.ps1"
36-
msbuild Tools\UnpEax\UnpEax.csproj /p:Configuration=Debug /p:DeployOnBuild=true
3736
msbuild DISMTools.vbproj /p:Configuration=Debug /p:DeployOnBuild=true /p:SolutionDir=$solutionDir /p:ProjectDir=$projectDir /p:TargetDir=$targetDir
3837
Move-Item -Path "$($solutionDir.TrimEnd("\"))\Installer\Output\dt_setup.exe" -Destination "$($solutionDir.TrimEnd("\"))\Installer\Nightly\dt_setup.exe" -Force
3938
- name: Upload Artifact

DISMTools.sln

-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 2012
44
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "DISMTools", "DISMTools.vbproj", "{042ED465-C910-407A-93D1-736639FF0EA5}"
5-
ProjectSection(ProjectDependencies) = postProject
6-
{5330BC3F-1BFF-4200-8872-3A2236F814AB} = {5330BC3F-1BFF-4200-8872-3A2236F814AB}
7-
EndProjectSection
85
EndProject
96
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{283DDE96-80B1-4AE2-9146-943E95039252}"
107
ProjectSection(SolutionItems) = preProject

DISMTools.vbproj

+7-6
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@
104104
<Reference Include="PresentationFramework">
105105
<Private>True</Private>
106106
</Reference>
107-
<Reference Include="Scintilla.NET, Version=5.6.5.0, Culture=neutral, PublicKeyToken=0221e70ba618311e, processorArchitecture=MSIL">
108-
<HintPath>packages\Scintilla5.NET.5.6.5\lib\net462\Scintilla.NET.dll</HintPath>
107+
<Reference Include="Scintilla.NET, Version=5.6.6.0, Culture=neutral, PublicKeyToken=0221e70ba618311e, processorArchitecture=MSIL">
108+
<HintPath>packages\Scintilla5.NET.5.6.6\lib\net462\Scintilla.NET.dll</HintPath>
109109
</Reference>
110110
<Reference Include="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
111111
<Private>True</Private>
@@ -1530,6 +1530,7 @@
15301530
<Content Include="Tools\UnattendGen\win-x86\UnattendGen.pdb" />
15311531
<Content Include="Tools\UnattendGen\win-x86\UnattendGenerator.dll" />
15321532
<Content Include="Tools\UnattendGen\win-x86\UnattendGenerator.pdb" />
1533+
<Content Include="Tools\UnpEax-Bin\UnpEax.exe" />
15331534
<None Include="Resources\actions\validation.png" />
15341535
<None Include="Resources\setting_migration.ico" />
15351536
<None Include="Resources\secprogress_classic.png" />
@@ -1920,9 +1921,9 @@ copy /y "$(SolutionDir)Tools\DT_IEConfig.reg" "DT_IEConfig.reg"
19201921
:: Copy registry file for ADK installations
19211922
copy /y "$(SolutionDir)Tools\DT_WinADK.reg" "DT_WinADK.reg"
19221923

1923-
IF EXIST "$(SolutionDir)Tools\UnpEax\bin\Debug\UnpEax.exe" (
1924+
IF EXIST "$(SolutionDir)Tools\UnpEax-Bin\UnpEax.exe" (
19241925
md "Tools\UnpEax"
1925-
copy /y "$(SolutionDir)Tools\UnpEax\bin\Debug\UnpEax.exe" "Tools\UnpEax\UnpEax.exe"
1926+
copy /y "$(SolutionDir)Tools\UnpEax-Bin\UnpEax.exe" "Tools\UnpEax\UnpEax.exe"
19261927
)
19271928

19281929
:: Copy UnattendGen
@@ -2001,12 +2002,12 @@ IF EXIST tools (
20012002

20022003
IF EXIST "report.html" (del "report.html")</PreBuildEvent>
20032004
</PropertyGroup>
2004-
<Import Project="packages\Scintilla5.NET.5.6.5\build\scintilla5.net.targets" Condition="Exists('packages\Scintilla5.NET.5.6.5\build\scintilla5.net.targets')" />
2005+
<Import Project="packages\Scintilla5.NET.5.6.6\build\scintilla5.net.targets" Condition="Exists('packages\Scintilla5.NET.5.6.6\build\scintilla5.net.targets')" />
20052006
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
20062007
<PropertyGroup>
20072008
<ErrorText>Este proyecto hace referencia a los paquetes NuGet que faltan en este equipo. Use la restauración de paquetes NuGet para descargarlos. Para obtener más información, consulte http://go.microsoft.com/fwlink/?LinkID=322105. El archivo que falta es {0}.</ErrorText>
20082009
</PropertyGroup>
2009-
<Error Condition="!Exists('packages\Scintilla5.NET.5.6.5\build\scintilla5.net.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Scintilla5.NET.5.6.5\build\scintilla5.net.targets'))" />
2010+
<Error Condition="!Exists('packages\Scintilla5.NET.5.6.6\build\scintilla5.net.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Scintilla5.NET.5.6.6\build\scintilla5.net.targets'))" />
20102011
</Target>
20112012
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
20122013
Other similar extension points exist, see Microsoft.Common.targets.

Elements/AutoUnattend/UserAccounts/User.vb

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Namespace Elements
8888
Return New UserValidationResults(False, "Either no users have been specified, or a program error occurred.")
8989
End If
9090
Dim errorReason As String = ""
91-
Dim ExistingUsers() As String = New String(5) {"administrator", "guest", "defaultaccount", "system", "network service", "local service"}
91+
Dim ExistingUsers() As String = New String(6) {"administrator", "guest", "defaultaccount", "system", "network service", "local service", "none"}
9292
' Assume it's true by default
9393
Dim FullyValid As Boolean = True
9494
For Each listedUser As User In userList

Helpers/extps1/PE_Helper/PE_Helper.ps1

+90-5
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ param (
3434
[Parameter(ParameterSetName = 'StartPEGen', Mandatory = $true, Position = 2)] [string]$imgFile,
3535
[Parameter(ParameterSetName = 'StartPEGen', Mandatory = $true, Position = 3)] [string]$isoPath,
3636
[Parameter(ParameterSetName = 'StartPEGen', Position = 4)] [string]$unattendFile,
37+
[Parameter(ParameterSetName = 'StartPEGen', Position = 5)] [string]$copyToVentoy = "false",
38+
[Parameter(ParameterSetName = 'StartPEGen', Position = 6)] [string]$bootex = "false",
3739
[Parameter(ParameterSetName = 'StartDevelopment', Mandatory = $true, Position = 1)] [string]$testArch,
3840
[Parameter(ParameterSetName = 'StartDevelopment', Mandatory = $true, Position = 2)] [string]$targetPath
3941
)
@@ -221,7 +223,7 @@ function Start-PEGeneration
221223
Write-Host "The ISO file structure has been successfully created. DISMTools will continue creating the ISO file automatically after 5 seconds."
222224
Start-Sleep -Seconds 5
223225
Write-Host "Creating ISO file..."
224-
if ((New-WinPEIso -peToolsPath $peToolsPath -isoLocation $isoPath) -eq $false)
226+
if ((New-WinPEIso -peToolsPath $peToolsPath -isoLocation $isoPath -bootex $bootex) -eq $false)
225227
{
226228
Write-Host "The ISO file has not been created successfully."
227229
Write-Host "Deleting temporary files..."
@@ -238,6 +240,40 @@ function Start-PEGeneration
238240
}
239241
Write-Host "The ISO file has been successfully created on the location you specified"
240242
Start-Sleep -Seconds 5
243+
if ($copyToVentoy -eq "true")
244+
{
245+
Write-Host "Please insert a Ventoy drive and press ENTER. To create Ventoy drives, follow the guide over at https://www.ventoy.net/en/doc_start.html"
246+
Read-Host | Out-Null
247+
$volumes = Get-Volume
248+
if (($?) -and ($volumes.Count -gt 0))
249+
{
250+
foreach ($volume in $volumes)
251+
{
252+
if ($volume -and $volume.FileSystemLabel -ieq "ventoy")
253+
{
254+
try
255+
{
256+
$destinationDrive = "$($volume.DriveLetter):\"
257+
Write-Host "-------------------------------------------------------------------------------------"
258+
Write-Host " The ISO file is being copied to the Ventoy drive. This can take several minutes, "
259+
Write-Host " depending on the speed of the target drive and your computer. Do not close this "
260+
Write-Host " window -- it will be closed automatically after the process completes. "
261+
Write-Host " "
262+
Write-Host " Ventoy drive the ISO file will be copied to: `"$destinationDrive`" "
263+
Write-Host "-------------------------------------------------------------------------------------"
264+
$isoPathName = [IO.Path]::GetFileName("$isoPath")
265+
Copy-Item -Path "$isoPath" -Destination "$destinationDrive$isoPathName" -Force -Recurse -Container
266+
Write-Host "The ISO file has been successfully copied."
267+
}
268+
catch
269+
{
270+
Write-Host "Could not copy the ISO file to the Ventoy drive. You will have to do this manually."
271+
}
272+
Start-Sleep -Seconds 1
273+
}
274+
}
275+
}
276+
}
241277
exit 0
242278
}
243279
else
@@ -299,6 +335,13 @@ function Copy-PEFiles
299335
{
300336
Set-Item -Path "env:OSCDImgRoot" -Value "$peToolsPath\..\Deployment Tools\x86\Oscdimg"
301337
}
338+
# ADK 10.1.26100.2454 and later copype's call the DISM executable to grab the boot binaries signed with the "Windows UEFI CA 2023" certificate.
339+
# This relies on yet another environment variable created by DandISetEnv.bat. Create it for our caller for copype to work. This should not matter
340+
# on older assessment and deployment kits, since they use this variable for nothing.
341+
#
342+
# CopyPE sets this variable to its version of DISM. We'll use the system DISM. Basically, all dism executables mount images with readonly
343+
# privileges.
344+
Set-Item -Path "env:DISMRoot" -Value "$env:SYSTEMROOT\system32"
302345
$copype = Start-Process -FilePath "$peToolsPath\copype.cmd" -ArgumentList "$architecture `"$targetDir`"" -Wait -PassThru -NoNewWindow
303346
if ($copype.ExitCode -eq 0)
304347
{
@@ -610,12 +653,17 @@ function New-WinPEIso
610653
The path of the Preinstallation Environment (PE) tools. By default, this is "Program Files\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools"
611654
.PARAMETER isoLocation
612655
The path of the target ISO file
656+
.PARAMETER bootex
657+
Determines whether or not to copy the EFI boot binaries signed with the "Windows UEFI CA 2023" certificate
613658
.EXAMPLE
614659
New-WinPEIso -peToolsPath "C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools" -isoLocation "C:\PreInstEnv.iso"
660+
.EXAMPLE
661+
New-WinPEIso -peToolsPath "C:\Program Files\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools" -isoLocation "C:\PreInstEnv.iso" -bootex "true"
615662
#>
616663
param (
617664
[Parameter(Mandatory = $true, Position = 0)] [string]$peToolsPath,
618-
[Parameter(Mandatory = $true, Position = 1)] [string]$isoLocation
665+
[Parameter(Mandatory = $true, Position = 1)] [string]$isoLocation,
666+
[Parameter(Position = 2)] [string]$bootex = "false"
619667
)
620668
try
621669
{
@@ -632,15 +680,43 @@ function New-WinPEIso
632680
{
633681
Set-Item -Path "env:NewPath" -Value "$peToolsPath\..\Deployment Tools\x86\Oscdimg"
634682
}
635-
if (Test-Path "$((Get-Location).Path)\ISOTEMP\fwfiles\etfsboot.com" -PathType Leaf)
683+
# Detect whether files are in fwfiles or bootbins - ADK 10.1.26100.2454 and later put boot files in bootbins,
684+
# not in fwfiles. All of this to add support for the boot binaries signed with this certificate - I'm starting to
685+
# hate Microsoft's approach to security
686+
$paths = [List[string]]::new()
687+
$paths.Add("bootbins")
688+
$paths.Add("fwfiles")
689+
$finalPath = ""
690+
foreach ($path in $paths)
691+
{
692+
if (Test-Path "$((Get-Location).Path)\ISOTEMP\$path")
693+
{
694+
$finalPath = $path
695+
break
696+
}
697+
}
698+
# Determine status of signed boot managers. This is only the case when the folder is bootbins
699+
$efiVars = "#pEF,e,b`"$((Get-Location).Path)\ISOTEMP\$finalPath\<EFIFILE_REPLACE>`""
700+
if ($finalPath -eq "bootbins")
701+
{
702+
if (($bootex -eq "true") -and (Test-Path "$((Get-Location).Path)\ISOTEMP\$finalPath\efisys_EX.bin" -PathType Leaf))
703+
{
704+
$efiVars = $efiVars.Replace("<EFIFILE_REPLACE>", "efisys_EX.bin").Trim()
705+
}
706+
else
707+
{
708+
$efiVars = $efiVars.Replace("<EFIFILE_REPLACE>", "efisys.bin").Trim()
709+
}
710+
}
711+
if (Test-Path "$((Get-Location).Path)\ISOTEMP\$finalPath\etfsboot.com" -PathType Leaf)
636712
{
637713
Write-Host "Generating ISO file with BIOS and UEFI compatibility..."
638-
$bootData = "2#p0,e,b`"$((Get-Location).Path)\ISOTEMP\fwfiles\etfsboot.com`"#pEF,e,b`"$((Get-Location).Path)\ISOTEMP\fwfiles\efisys.bin`""
714+
$bootData = "2#p0,e,b`"$((Get-Location).Path)\ISOTEMP\$finalPath\etfsboot.com`"$($efiVars)"
639715
}
640716
else
641717
{
642718
Write-Host "Generating ISO file with UEFI compatibility..."
643-
$bootData = "1#pEF,e,b`"$((Get-Location).Path)\ISOTEMP\fwfiles\efisys.bin`""
719+
$bootData = "1$($efiVars)"
644720
}
645721
$oscdimgProc = Start-Process "$env:NewPath\oscdimg.exe" -ArgumentList "-lDISMTools_PE -bootdata:$bootData -u2 -udfver102 `"$((Get-Location).Path)\ISOTEMP\media`" `"$isoLocation`"" -Wait -PassThru -NoNewWindow
646722
if ($oscdimgProc.ExitCode -eq 0)
@@ -800,9 +876,12 @@ function Start-OSApplication
800876
$drivers = (Get-Content -Path $driverPath | Where-Object { $_.Trim() -ne "" })
801877
foreach ($driver in $drivers)
802878
{
879+
$drvCount = $drivers.Count
880+
$curDrvIndex = $drivers.IndexOf($driver)
803881
if (Test-Path -Path "$driver" -PathType Leaf)
804882
{
805883
Write-Host "Adding driver `"$driver`"... " -NoNewline
884+
Write-Progress -Activity "Adding drivers..." -Status "Adding driver $($curDrvIndex + 1) of $($drvCount): `"$([IO.Path]::GetFileName($driver))`"..." -PercentComplete (($curDrvIndex / $drvCount) * 100)
806885
if ((Start-DismCommand -Verb Add-Driver -ImagePath "$($driveLetter):\" -DriverAdditionFile "$driver" -DriverAdditionRecurse $false) -eq $true)
807886
{
808887
Write-Host "SUCCESS" -ForegroundColor White -BackgroundColor DarkGreen
@@ -813,6 +892,7 @@ function Start-OSApplication
813892
}
814893
}
815894
}
895+
Write-Progress -Activity "Adding drivers..." -Completed
816896
# Perform serviceability tests one more time
817897
if ($serviceableArchitecture) { Set-Serviceability -ImagePath "$($driveLetter):\" } else { Write-Host "Serviceability tests will not be run: the image architecture and the PE architecture are different." }
818898
}
@@ -1140,7 +1220,12 @@ function Get-WimIndexes
11401220
try
11411221
{
11421222
$index = [int]$idx
1223+
$imageCount = (Get-WindowsImage -ImagePath "$wimPath").Count
11431224
# return $index
1225+
if (($index -lt 1) -or ($index -gt $imageCount)) {
1226+
Write-Host "An invalid index has been specified."
1227+
throw
1228+
}
11441229
$wimFile = [TargetImage]::new($index, $wimPath)
11451230
return $wimFile
11461231
}
85.5 KB
Binary file not shown.

My Project/AssemblyInfo.vb

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
3131
' mediante el asterisco ('*'), como se muestra a continuación:
3232
' <Assembly: AssemblyVersion("1.0.*")>
3333

34-
<Assembly: AssemblyVersion("0.6.1.2512")>
35-
<Assembly: AssemblyFileVersion("0.6.1.2512")>
34+
<Assembly: AssemblyVersion("0.6.1.25021")>
35+
<Assembly: AssemblyFileVersion("0.6.1.25021")>

My Project/Resources.Designer.vb

+6-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

My Project/Resources.resx

+12-7
Original file line numberDiff line numberDiff line change
@@ -929,17 +929,22 @@ GPT ATTRIBUTES=0x8000000000000001</value>
929929
<data name="WhatsNew" xml:space="preserve">
930930
<value>Bugfixes:
931931

932-
- Fixed an issue where feature disablement would not be possible due to a DynaLog logger issue
933-
- WIMBoot options are no longer enabled if the Windows image being serviced does not contain Windows 8.1 (#211, thanks @arielsil and @dede333)
932+
- The PE Helper now detects whether the selected index is invalid
933+
- Fixed a visual issue in the image index switch dialog
934934

935935
New features:
936936

937937
- HotInstall has been updated to the latest version
938-
- You can now view a bit more information when specifying the image index for your Windows image by typing "INFO"
938+
- You can now copy your ISO files to Ventoy drives
939+
- When installing the drivers specified in the Driver Installation Module, you will now see a progress indicator
940+
- The ISO creator now detects the architectures that are supported by the Assessment and Deployment Kit installed on your computer
941+
- Compatibility has been improved for the latest Windows ADKs (starting from version 10.1.26100.2454 - December 2024 update):
942+
- ISO creation will finish successfully now
943+
- You can now create ISO files with boot binaries signed with the "Windows UEFI CA 2023" certificate:
939944
- UnattendGen has been updated to the latest version
940-
- You can now configure post-installation scripts for your unattended answer files
941-
- When you change the computer name to an empty value, you won't be annoyed to put a computer name as much
942-
- DynaLog logging can now be disabled on demand, and you can now configure the editor to open operation logs from within the Options dialog
943-
- DISM output is now redirected to the progress panel</value>
945+
- User accounts with "None" names are now blocked
946+
- Log switchers in the progress panel are more visually appealing now
947+
- CODE: DynaLog now uses 64-bit long types for file content detection
948+
- Scintilla.NET has been updated to version 5.6.6</value>
944949
</data>
945950
</root>

0 commit comments

Comments
 (0)