Skip to content

Commit 3bbe9b9

Browse files
DISMTools 0.6.1 Preview 4 (#223)
* Update assembly information * [PE Helper] Fixed EFI file issue if not in bootbins * [PE Helper] Update HotInstall (02/10/2025) Update HotInstall to its latest commit: CodingWonders/DT-HotInstall@d1d39fb * [DynaLog] Add edge-case for faulty CMOS batteries * [PE Helper] Update HotInstall (02/12/2025) Update HotInstall to its latest commit: CodingWonders/DT-HotInstall@b64f60a * [Unattended answer file] Add support for multiple architectures * [DynaLog] Be more descriptive when message will not be logged * [Info Saver] Close regardless of the option * [Unattended answer file] Add spacing normalization options * [Enhance] Localize log panel switchers * [Info Saver] Show proper count for AppX package array * [ISO Creator] Put back all items if all of them were removed * [PE Helper] Modify message for DIM driver installation * [PE Helper] Add code for WinPE update installation * [PE Helper] Update HotInstall (02/17/2025) Update HotInstall to its latest commit: CodingWonders/DT-HotInstall@0f3bd4b * [Fix] Fix directory attribute comparison issue (#220) * [PE Helper] Replace Path Root getter with env variable * [Unattended answer file] Update UnattendGen * [PE Helper ES] Add DimStart Alias * [PE Helper] Update HotInstall (02/20/2025) Update HotInstall to its latest commit: CodingWonders/DT-HotInstall@be57444 * [Info Saver] Don't take into account empty item * [Fix] Fixed additional recents list exception * [Fix] Fixed additional directory attribute issues * [Videos] Remove border, allow fullscreen * [REL] Update What's New section, new Update Info files
1 parent 54fd00e commit 3bbe9b9

35 files changed

+397
-165
lines changed

DISMTools.vbproj

+3
Original file line numberDiff line numberDiff line change
@@ -1214,6 +1214,9 @@
12141214
<None Include="Helpers\extps1\mImgMgr.ps1">
12151215
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
12161216
</None>
1217+
<None Include="Helpers\extps1\PE_Helper\files\dim_start\dimstart.bat">
1218+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
1219+
</None>
12171220
<None Include="Helpers\extps1\PE_Helper\files\diskpart\dp_listdisk.dp">
12181221
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
12191222
</None>

Helpers/extps1/PE_Helper/PE_Helper.ps1

+77-19
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ function Start-PEGeneration
8888
$peToolsPath = ""
8989
if ([Environment]::Is64BitOperatingSystem)
9090
{
91-
$progFiles = "$([IO.Path]::GetPathRoot([Environment]::GetFolderPath([Environment+SpecialFolder]::Windows)))Program Files (x86)"
91+
$progFiles = "$env:SYSTEMDRIVE\Program Files (x86)"
9292
}
9393
else
9494
{
95-
$progFiles = "$([IO.Path]::GetPathRoot([Environment]::GetFolderPath([Environment+SpecialFolder]::Windows)))Program Files"
95+
$progFiles = "$env:SYSTEMDRIVE\Program Files"
9696
}
9797
if (Test-Path "$progFiles\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment")
9898
{
@@ -124,6 +124,40 @@ function Start-PEGeneration
124124
Read-Host | Out-Null
125125
exit 1
126126
}
127+
if ((Test-Path "$((Get-Location).Path)\peUpdates") -and ((Get-ChildItem "$((Get-Location).Path)\peUpdates").Count -gt 0))
128+
{
129+
Write-Host "Applying Windows PE updates..."
130+
$updates = Get-ChildItem "$((Get-Location).Path)\peUpdates"
131+
$successfulUpdates = 0
132+
$failedUpdates = 0
133+
if ($updates.Count -gt 0)
134+
{
135+
foreach ($update in $updates)
136+
{
137+
$curPkgIndex = $updates.IndexOf($update)
138+
if (Test-Path "$update" -PathType Leaf)
139+
{
140+
Write-Progress -Activity "Adding updates..." -Status "Adding package $($curPkgIndex + 1) of $($updates.Count)" -PercentComplete (($curPkgIndex / $updates.Count) * 100)
141+
if ((Start-DismCommand -Verb Add-Package -ImagePath "$mountDirectory" -PackagePath "$update") -eq $true)
142+
{
143+
$successfulUpdates++
144+
}
145+
else
146+
{
147+
$failedUpdates++
148+
}
149+
}
150+
}
151+
Write-Progress -Activity "Adding updates..." -Completed
152+
Write-Host "==================================================================="
153+
Write-Host "Update installation summary:"
154+
Write-Host "- Successful update installations: $successfulUpdates"
155+
Write-Host "- Failed update installations: $failedUpdates"
156+
Write-Host "==================================================================="
157+
}
158+
Write-Host "Saving changes..."
159+
Start-DismCommand -Verb Commit -ImagePath "$mountDirectory" | Out-Null
160+
}
127161
Write-Host "Copying Windows PE optional components. Please wait..."
128162
if ((Copy-PEComponents -peToolsPath "$progFiles\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment" -architecture $architecture -targetDir "$((Get-Location).Path)\ISOTEMP") -eq $false)
129163
{
@@ -554,6 +588,7 @@ function Start-PECustomization
554588
Set-Content -Path "$imagePath\Windows\system32\startnet.cmd" -Value $contents -Force
555589
}
556590
Copy-Item -Path "$((Get-Location).Path)\files\startup\StartInstall.ps1" -Destination "$imagePath\StartInstall.ps1" -Force
591+
Copy-Item -Path "$((Get-Location).Path)\files\dim_start\dimstart.bat" -Destination "$imagePath\dimstart.bat"
557592
Write-Host "Startup commands changed"
558593
}
559594
catch
@@ -708,6 +743,10 @@ function New-WinPEIso
708743
$efiVars = $efiVars.Replace("<EFIFILE_REPLACE>", "efisys.bin").Trim()
709744
}
710745
}
746+
else
747+
{
748+
$efiVars = $efiVars.Replace("<EFIFILE_REPLACE>", "efisys.bin").Trim()
749+
}
711750
if (Test-Path "$((Get-Location).Path)\ISOTEMP\$finalPath\etfsboot.com" -PathType Leaf)
712751
{
713752
Write-Host "Generating ISO file with BIOS and UEFI compatibility..."
@@ -868,31 +907,50 @@ function Start-OSApplication
868907
Write-Host "FAILURE" -ForegroundColor Black -BackgroundColor DarkRed
869908
}
870909
}
871-
$driverPath = "$([IO.Path]::GetPathRoot([Environment]::GetFolderPath([Environment+SpecialFolder]::Windows)))DT_InstDrvs.txt"
910+
$driverPath = "$env:SYSTEMDRIVE\DT_InstDrvs.txt"
872911
if ((Test-Path "$($driveLetter):\`$DISMTOOLS.~LS") -and ($serviceableArchitecture) -and (Test-Path -Path $driverPath -PathType Leaf))
873912
{
874913
Write-Host "Adding drivers to the target image..."
875914
# Add drivers that were previously added to the Windows PE using the DIM
876915
$drivers = (Get-Content -Path $driverPath | Where-Object { $_.Trim() -ne "" })
916+
$drvCount = $drivers.Count
917+
$successfulInstallations = 0
918+
$failedInstallations = 0
919+
$failedDrivers = [List[string]]::new()
877920
foreach ($driver in $drivers)
878921
{
879-
$drvCount = $drivers.Count
880922
$curDrvIndex = $drivers.IndexOf($driver)
881923
if (Test-Path -Path "$driver" -PathType Leaf)
882924
{
883-
Write-Host "Adding driver `"$driver`"... " -NoNewline
884925
Write-Progress -Activity "Adding drivers..." -Status "Adding driver $($curDrvIndex + 1) of $($drvCount): `"$([IO.Path]::GetFileName($driver))`"..." -PercentComplete (($curDrvIndex / $drvCount) * 100)
885926
if ((Start-DismCommand -Verb Add-Driver -ImagePath "$($driveLetter):\" -DriverAdditionFile "$driver" -DriverAdditionRecurse $false) -eq $true)
886927
{
887-
Write-Host "SUCCESS" -ForegroundColor White -BackgroundColor DarkGreen
928+
$successfulInstallations++
888929
}
889930
else
890931
{
891-
Write-Host "FAILURE" -ForegroundColor Black -BackgroundColor DarkRed
932+
$failedInstallations++
933+
# Add the driver to the failed list, so we can display it later
934+
$failedDrivers.Add("$driver")
892935
}
893936
}
894937
}
895938
Write-Progress -Activity "Adding drivers..." -Completed
939+
# Show results
940+
Write-Host "==================================================================="
941+
Write-Host "Driver installation summary:"
942+
Write-Host "- Successful driver installations: $successfulInstallations"
943+
Write-Host "- Failed driver installations: $failedInstallations"
944+
Write-Host "==================================================================="
945+
if ($failedDrivers.Count -gt 0)
946+
{
947+
Write-Host " Drivers that could not be installed:"
948+
foreach ($failedDriver in $failedDrivers)
949+
{
950+
Write-Host " - `"$failedDriver`""
951+
}
952+
}
953+
Write-Host "The installer will attempt to perform serviceability tests one more time. Hold on for a bit, this will not take long..."
896954
# Perform serviceability tests one more time
897955
if ($serviceableArchitecture) { Set-Serviceability -ImagePath "$($driveLetter):\" } else { Write-Host "Serviceability tests will not be run: the image architecture and the PE architecture are different." }
898956
}
@@ -912,9 +970,9 @@ function Start-OSApplication
912970

913971
if ($supportedArchitectures.Contains($systemArchitecture))
914972
{
915-
if (Test-Path -Path "$([IO.Path]::GetPathRoot([Environment]::GetFolderPath([Environment+SpecialFolder]::Windows)))Tools\RestartDialog\$systemArchitecture\DTPE-RestartDialog.exe")
973+
if (Test-Path -Path "$env:SYSTEMDRIVE\Tools\RestartDialog\$systemArchitecture\DTPE-RestartDialog.exe")
916974
{
917-
Start-Process -FilePath "$([IO.Path]::GetPathRoot([Environment]::GetFolderPath([Environment+SpecialFolder]::Windows)))Tools\RestartDialog\$systemArchitecture\DTPE-RestartDialog.exe" -Wait
975+
Start-Process -FilePath "$env:SYSTEMDRIVE\Tools\RestartDialog\$systemArchitecture\DTPE-RestartDialog.exe" -Wait
918976
}
919977
}
920978

@@ -988,7 +1046,7 @@ function Get-Disks
9881046

9891047
# Show additional tools
9901048
Write-Host "- To load drivers, type `"DIM`" and press ENTER"
991-
if (Test-Path -Path "$([IO.Path]::GetPathRoot([Environment]::GetFolderPath([Environment+SpecialFolder]::Windows)))HotInstall\DSCReport.txt" -PathType Leaf) {
1049+
if (Test-Path -Path "$env:SYSTEMDRIVE\HotInstall\DSCReport.txt" -PathType Leaf) {
9921050
Write-Host "- To get a look at what disks are applicable for operating system installation, type DSCR"
9931051
}
9941052
Write-Host ""
@@ -1013,18 +1071,18 @@ function Get-Disks
10131071

10141072
if ($supportedArchitectures.Contains($systemArchitecture))
10151073
{
1016-
if (Test-Path -Path "$([IO.Path]::GetPathRoot([Environment]::GetFolderPath([Environment+SpecialFolder]::Windows)))Tools\DIM\$systemArchitecture\DT-DIM.exe")
1074+
if (Test-Path -Path "$env:SYSTEMDRIVE\Tools\DIM\$systemArchitecture\DT-DIM.exe")
10171075
{
10181076
Clear-Host
10191077
Write-Host "Starting the Driver Installation Module...`n`nYou will go back to the disk selection screen after closing the program."
1020-
Start-Process -FilePath "$([IO.Path]::GetPathRoot([Environment]::GetFolderPath([Environment+SpecialFolder]::Windows)))Tools\DIM\$systemArchitecture\DT-DIM.exe" -Wait
1078+
Start-Process -FilePath "$env:SYSTEMDRIVE\Tools\DIM\$systemArchitecture\DT-DIM.exe" -Wait
10211079
}
10221080
}
10231081
Get-Disks
10241082
}
10251083
"DSCR" {
1026-
if (Test-Path -Path "$([IO.Path]::GetPathRoot([Environment]::GetFolderPath([Environment+SpecialFolder]::Windows)))HotInstall\DSCReport.txt" -PathType Leaf) {
1027-
notepad X:\HotInstall\DSCReport.txt
1084+
if (Test-Path -Path "$env:SYSTEMDRIVE\HotInstall\DSCReport.txt" -PathType Leaf) {
1085+
notepad "$env:SYSTEMDRIVE\HotInstall\DSCReport.txt"
10281086
} else {
10291087
Write-Host "Either no report has been created or the installation has not been started with HotInstall."
10301088
Start-Sleep -Seconds 3
@@ -1059,9 +1117,9 @@ function Get-Partitions
10591117
exit
10601118
'@
10611119
$partLister = $partLister.Replace("<REPLACEME>", $driveNum).Trim()
1062-
$partLister | Out-File -FilePath "X:\files\diskpart\dp_listpart.dp" -Force -Encoding utf8
1120+
$partLister | Out-File -FilePath "$env:SYSTEMDRIVE\files\diskpart\dp_listpart.dp" -Force -Encoding utf8
10631121
$part = -1
1064-
diskpart /s "X:\files\diskpart\dp_listpart.dp" | Out-Host
1122+
diskpart /s "$env:SYSTEMDRIVE\files\diskpart\dp_listpart.dp" | Out-Host
10651123
Write-Host ""
10661124
Write-Host "- If the selected disk contains no partitions, press ENTER. Otherwise, type a partition number."
10671125
Write-Host "- If you have selected the wrong disk, type `"B`" now and press ENTER`n"
@@ -1663,7 +1721,7 @@ function Start-ProjectDevelopment {
16631721
$mountDirectory = ""
16641722
$architecture = [PE_Arch]::($testArch)
16651723
$version = "0.6.1"
1666-
$ESVer = "0.6"
1724+
$ESVer = "0.6.1"
16671725
Write-Host "DISMTools $version - Preinstallation Environment Helper"
16681726
Write-Host "(c) 2024-2025. CodingWonders Software"
16691727
Write-Host "-----------------------------------------------------------"
@@ -1679,11 +1737,11 @@ function Start-ProjectDevelopment {
16791737
$peToolsPath = ""
16801738
if ([Environment]::Is64BitOperatingSystem)
16811739
{
1682-
$progFiles = "$([IO.Path]::GetPathRoot([Environment]::GetFolderPath([Environment+SpecialFolder]::Windows)))Program Files (x86)"
1740+
$progFiles = "$env:SYSTEMDRIVE\Program Files (x86)"
16831741
}
16841742
else
16851743
{
1686-
$progFiles = "$([IO.Path]::GetPathRoot([Environment]::GetFolderPath([Environment+SpecialFolder]::Windows)))Program Files"
1744+
$progFiles = "$env:SYSTEMDRIVE\Program Files"
16871745
}
16881746
if (Test-Path "$progFiles\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment")
16891747
{
-2.9 KB
Binary file not shown.
2.5 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
@echo off
2+
setlocal ENABLEDELAYEDEXPANSION
3+
set sysdrive=%SYSTEMDRIVE%
4+
5+
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 (
6+
if exist "%%D:\" (
7+
if exist "%%D:\Tools\DIM" (
8+
echo Copying program tools to the environment...
9+
cd /d %%D:
10+
if not exist "%sysdrive%\Tools\DIM" (md "%sysdrive%\Tools\DIM")
11+
xcopy "%%D:\Tools\DIM\*" "%sysdrive%\Tools\DIM" /cehyi > nul
12+
cd /d %sysdrive%
13+
echo Starting the Driver Installation Module for architecture %PROCESSOR_ARCHITECTURE%...
14+
if "%PROCESSOR_ARCHITECTURE%" equ "X86" (
15+
"%sysdrive%\Tools\DIM\i386\DT-DIM.exe"
16+
) else if "%PROCESSOR_ARCHITECTURE%" equ "AMD64" (
17+
"%sysdrive%\Tools\DIM\amd64\DT-DIM.exe"
18+
)
19+
exit
20+
)
21+
)
22+
)

Helpers/extps1/PE_Helper/files/startup/startnet.cmd

+2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ if %debug% lss 2 (
4848
echo - For more Windows PE commands, type "wpeutil"
4949
echo.
5050
echo - To manually start the installation procedure, type "StartInstall" and press ENTER. You need a drive containing a Windows image
51+
echo - To start the Driver Installation Module in case you need to load drivers, type "StartDim" and press ENTER
5152
echo.
5253
doskey StartInstall=powershell -file "\StartInstall.ps1"
54+
doskey StartDim=cmd /c "\dimstart.bat"
5355
exit /b
5456
)

MainForm.vb

+5-1
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ Public Class MainForm
585585
End Function
586586

587587
Function GetCopyrightTimespan(ByVal start As Integer, ByVal current As Integer) As String
588-
If current = start Then
588+
If current <= start Then
589589
Return current.ToString()
590590
Else
591591
Return start.ToString() & "-" & current.ToString()
@@ -19127,6 +19127,10 @@ Public Class MainForm
1912719127
MsgBox("No items are present in the Recents list.")
1912819128
Exit Sub
1912919129
End If
19130+
If (itemOrder + 1) > RecentList.Count Then
19131+
DynaLog.LogMessage("Item with index " & itemOrder & " is not yet declared in the Recents list. Exiting...")
19132+
Exit Sub
19133+
End If
1913019134
If RecentList(itemOrder).ProjPath <> "" And File.Exists(RecentList(itemOrder).ProjPath) Then
1913119135
DynaLog.LogMessage("Selected item is not bogus and exists. Loading project...")
1913219136
If isProjectLoaded Then UnloadDTProj(False, If(OnlineManagement Or OfflineManagement, False, True), False)

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.25021")>
35-
<Assembly: AssemblyFileVersion("0.6.1.25021")>
34+
<Assembly: AssemblyVersion("0.6.1.25022")>
35+
<Assembly: AssemblyFileVersion("0.6.1.25022")>

My Project/Resources.Designer.vb

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

My Project/Resources.resx

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

932-
- The PE Helper now detects whether the selected index is invalid
933-
- Fixed a visual issue in the image index switch dialog
932+
- Fixed an issue where the PE Helper would not create ISO files if you had a version of the Windows ADK earlier than 10.1.26100.2454
933+
- AppX package counts in image information reports are more reasonable now on Windows 8 hosts
934+
- Fixed an issue where folder attributes for AppX package addition and driver addition were not being detected correctly (#220, thanks @InnerBrat for spotting)
935+
- Fixed an additional issue regarding the Recents list
934936

935937
New features:
936938

937-
- HotInstall has been updated to the latest version
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:
939+
- HotInstall has been updated to the latest version, with a localized Disk Space Checker, and support for exporting system drivers if you wish
940+
- When installing drivers specified in the Driver Installation Module (DIM), you will now see a different output consisting of a summary
941+
- The Extensibility Suite has had some improvements:
942+
- Support has been added for ADK 10.1.26100.2454
943+
- An alias ("StartDim") has been added, letting you launch the Driver Installation Module more easily
944944
- UnattendGen has been updated to the latest version
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>
945+
- You can now target multiple processor architectures with your answer file
946+
- You can now normalize the spacing of your unattended answer file to make it consistent
947+
- Progress panel log switcher buttons are now localized</value>
949948
</data>
950949
</root>

0 commit comments

Comments
 (0)