Skip to content

Commit e482dba

Browse files
DISMTools 0.7 Preview 3 (#260)
* Update assembly information * [Fix] Fixed update checker issue * [Info Dialogs] Small refactor * [PE Helper] Add README * [PE Helper] Show restart message in a cleaner fashion * [PE Helper] Create a file for diskpart list disk * [Enhance] Save DISM output on operation finish * [Theme Designer] Fixed deployment issues * [Theme Engine] Add color theme switch capabilities, add 0.4 Enhanced Themes * [Unattended answer file] Add option to hide PWSH windows * [Settings] Add option to hide clock * [Unattended answer file] Modify welcome message * [Fix] Prevent user writes to console control * [Fix] Fixed image edition tasks never finishing * [DynaLog] Allow logging of additional, non-DISM related exceptions for bgprocs * [PE Helper] Improve WDS Helper Server Component (client coming soon) * [Unattended answer file] Fix anchor for checkbox * [PE Helper] WDS Helper Client and more goodies - WDS Helper Client - DT PE Menu * [Enhance] Disable close capability with Window Helper * [PE Helper] Finalized WDS Helper Client for TP1 - Fixed possible race conditions - Separated requests using folders with GUID names - WDSH server can now block devices with requests denied by WDS - Fatal errors no longer exit the script, but reboot the computer after 5 seconds * [Library] Update DISM API to 3.3.12 * [REL] Update What's New section
1 parent 661a627 commit e482dba

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

+2049
-457
lines changed

DISMTools.vbproj

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
<HintPath>packages\Markdig.0.41.0\lib\net462\Markdig.dll</HintPath>
8585
</Reference>
8686
<Reference Include="Microsoft.Dism, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5bba90053b345501, processorArchitecture=MSIL">
87-
<HintPath>packages\Microsoft.Dism.3.3.0\lib\net40\Microsoft.Dism.dll</HintPath>
87+
<HintPath>packages\Microsoft.Dism.3.3.12\lib\net40\Microsoft.Dism.dll</HintPath>
8888
</Reference>
8989
<Reference Include="Microsoft.WindowsAPICodePack.Core, Version=8.0.6.0, Culture=neutral, PublicKeyToken=8afb38e9204fc0a9, processorArchitecture=MSIL">
9090
<HintPath>packages\WindowsAPICodePack.8.0.6\lib\net48\Microsoft.WindowsAPICodePack.Core.dll</HintPath>
@@ -1198,15 +1198,15 @@
11981198
<None Include="Helpers\extps1\PE_Helper\files\dim_start\dimstart.bat">
11991199
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
12001200
</None>
1201-
<None Include="Helpers\extps1\PE_Helper\files\diskpart\dp_listdisk.dp">
1202-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
1203-
</None>
12041201
<None Include="Helpers\extps1\PE_Helper\files\DISMTools-PE.zip">
12051202
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
12061203
</None>
12071204
<None Include="Helpers\extps1\PE_Helper\files\HotInstall.zip">
12081205
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
12091206
</None>
1207+
<None Include="Helpers\extps1\PE_Helper\files\startup\menu.ps1">
1208+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
1209+
</None>
12101210
<None Include="Helpers\extps1\PE_Helper\files\startup\StartInstall.ps1">
12111211
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
12121212
</None>
@@ -1222,6 +1222,9 @@
12221222
<None Include="Helpers\extps1\PE_Helper\pxehelpers\wds\prepare_wds.ps1">
12231223
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
12241224
</None>
1225+
<None Include="Helpers\extps1\PE_Helper\pxehelpers\wds\wdshelper.ps1">
1226+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
1227+
</None>
12251228
<None Include="Helpers\extps1\PE_Helper\pxehelpers\wds\wdshelper_server.ps1">
12261229
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
12271230
</None>
@@ -1268,10 +1271,12 @@
12681271
<None Include="Tools\UnattendGen\win-x86\publish\UnattendGen.runtimeconfig.json" />
12691272
<None Include="Tools\UnattendGen\win-x86\UnattendGen.deps.json" />
12701273
<None Include="Tools\UnattendGen\win-x86\UnattendGen.runtimeconfig.json" />
1271-
<None Include="Utilities\ThemeUtilities\ThemeFiles\DT05Dark.ini" />
1272-
<None Include="Utilities\ThemeUtilities\ThemeFiles\DT05Light.ini" />
12731274
<None Include="Utilities\ThemeUtilities\ThemeFiles\default_dark.ini" />
12741275
<None Include="Utilities\ThemeUtilities\ThemeFiles\default_light.ini" />
1276+
<None Include="Utilities\ThemeUtilities\ThemeFiles\DT04Dark.ini" />
1277+
<None Include="Utilities\ThemeUtilities\ThemeFiles\DT04Light.ini" />
1278+
<None Include="Utilities\ThemeUtilities\ThemeFiles\DT05Dark.ini" />
1279+
<None Include="Utilities\ThemeUtilities\ThemeFiles\DT05Light.ini" />
12751280
</ItemGroup>
12761281
<ItemGroup>
12771282
<None Include="Panels\readme.md" />
@@ -1812,6 +1817,7 @@
18121817
</ItemGroup>
18131818
<ItemGroup>
18141819
<Folder Include="bin\Debug\" />
1820+
<Folder Include="Helpers\extps1\PE_Helper\files\diskpart\" />
18151821
<Folder Include="Panels\Set_Ops\" />
18161822
<Folder Include="Tools\UnpEax\" />
18171823
<Folder Include="Updater\" />
@@ -1918,7 +1924,8 @@ IF EXIST "$(SolutionDir)Utilities\ThemeUtilities\ThemeFiles\*.ini" (
19181924

19191925
:: Copy Theme Designer
19201926
IF EXIST "$(SolutionDir)Tools\DT_ThemeDesigner\out\*.exe" (
1921-
xcopy "$(SolutionDir)Tools\DT_ThemeDesigner\out\*.exe" "Tools\ThemeDesigner" /cehyi
1927+
xcopy "$(SolutionDir)Tools\DT_ThemeDesigner\out\*.*" "Tools\ThemeDesigner" /cehyi
1928+
del "Tools\ThemeDesigner\*.zip" /F /S /Q
19221929
)
19231930

19241931
IF NOT EXIST AutoUnattend (

Helpers/extps1/PE_Helper/PE_Helper.ps1

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -632,13 +632,26 @@ function Start-PECustomization
632632
Set-Content -Path "$imagePath\Windows\system32\startnet.cmd" -Value $contents -Force
633633
}
634634
Copy-Item -Path "$((Get-Location).Path)\files\startup\StartInstall.ps1" -Destination "$imagePath\StartInstall.ps1" -Force
635-
Copy-Item -Path "$((Get-Location).Path)\files\dim_start\dimstart.bat" -Destination "$imagePath\dimstart.bat"
635+
Copy-Item -Path "$((Get-Location).Path)\files\dim_start\dimstart.bat" -Destination "$imagePath\dimstart.bat" -Force
636+
Copy-Item -Path "$((Get-Location).Path)\files\startup\menu.ps1" -Destination "$imagePath\menu.ps1" -Force
636637
Write-Host "Startup commands changed"
637638
}
638639
catch
639640
{
640641
Write-Host "Could not change startup commands"
641642
}
643+
try
644+
{
645+
Write-Host "CUSTOMIZATION STEP - Prepare System for Network-based Installations" -BackgroundColor DarkGreen
646+
Write-Host "Preparing NetInstall..."
647+
New-Item -Path "$imagePath\pxehelpers" -ItemType Directory | Out-Null
648+
Copy-Item -Path "$((Get-Location).Path)\pxehelpers\*" -Destination "$imagePath\pxehelpers" -Verbose -Force -Recurse -Container -ErrorAction SilentlyContinue
649+
Write-Host "The target system is now ready for network-based installations"
650+
}
651+
catch
652+
{
653+
Write-Host "Could not prepare the system for network-based installations"
654+
}
642655
Write-Host "CUSTOMIZATION STEP - Set Scratch Size" -BackgroundColor DarkGreen
643656
Write-Host "Setting scratch size..."
644657
dism /English /image="$imagePath" /set-scratchspace=512 | Out-Host
@@ -836,7 +849,12 @@ function Start-OSApplication
836849
Write-Host "No Windows image has been found on this drive. An installation image is required. Exiting..."
837850
exit 1
838851
}
852+
$diskGetterDpScript = @'
853+
lis dis
854+
exit
855+
'@
839856
New-Item -Path "X:\files\diskpart" -ItemType Directory -Force | Out-Null
857+
$diskGetterDpScript | Out-File "X:\files\diskpart\dp_listdisk.dp" -Force -Encoding utf8
840858
$drive = Get-Disks
841859
if ($drive -eq "ERROR")
842860
{
@@ -1004,6 +1022,8 @@ function Start-OSApplication
10041022
}
10051023
New-BootFiles -drLetter $driveLetter -bootPart "auto" -diskId $drive -cleanDrive $($partition -eq 0)
10061024
Start-Sleep -Milliseconds 250
1025+
Clear-Host
1026+
Write-Host "`n`n`n`n`n`n`n`n`n`n"
10071027
Write-Host "The first stage of Setup has completed, and your system will reboot automatically."
10081028
Write-Host "If there are any bootable devices, remove those before proceeding, as your system may boot to this environment again."
10091029
Write-Host "When your computer restarts, Setup will continue."
@@ -1055,9 +1075,9 @@ function Get-Disks
10551075
#>
10561076

10571077
# Show disk list with diskpart
1058-
if (Test-Path .\files\diskpart\dp_listdisk.dp -PathType Leaf)
1078+
if (Test-Path "$env:SYSTEMDRIVE\files\diskpart\dp_listdisk.dp" -PathType Leaf)
10591079
{
1060-
diskpart /s ".\files\diskpart\dp_listdisk.dp" | Out-Host
1080+
diskpart /s "$env:SYSTEMDRIVE\files\diskpart\dp_listdisk.dp" | Out-Host
10611081
}
10621082
else
10631083
{

Helpers/extps1/PE_Helper/README.MD

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# The DISMTools Preinstallation Environment Helper (PE Helper)
2+
3+
The Preinstallation Environment Helper is a set of scripts and applications designed to help during test deployments of your Windows images. It's used to create the ISO file and install your Windows image, whether it's a local deployment or a network-based one.
4+
5+
To learn more about the PE Helper in detail, refer to the DISMTools Help documentation.
6+
7+
## Folder Contents
8+
9+
| Script | Description |
10+
|:--|:--:|
11+
| `PE_Helper.ps1` | The main event. The script generates the ISO file and installs the operating system |
12+
| `backgrounds` | The folder containing the background images used in the DISMTools Preinstallation Environment |
13+
| `files\dimstart.bat` | A script that manually starts the Driver Installation Module |
14+
| `files\startup\StartInstall.ps1` | A script that manually starts operating system installation from within the Extensibility Suite |
15+
| `files\startup\startnet.cmd` | **Required for Windows PE**. A script that starts the preinstallation environment |
16+
| `files\DISMTools-PE.zip` | A ZIP file containing Visual Studio solution files for the Extensibility Suite |
17+
| `files\HotInstall.zip` | DISMTools HotInstall, which lets you install the operating system from a full Windows installation |
18+
| `pxehelpers` | The DISMTools PXE Helpers, currently for Windows Deployment Services (WDS) |
19+
| `pxehelpers\wds` | The DISMTools PXE Helpers for Windows Deployment Services (WDS) |
20+
| `tools\DIM` | The folder containing the source code for the Driver Installation Module |
21+
22+
## Script disclaimer
23+
24+
The scripts present in this repository are provided **AS IS, WITHOUT ANY WARRANTY**. We AREN'T RESPONSIBLE for any damage done to your device.
25+
26+
Just like any script, you should read the source code of these files if you're a programmer who knows Batch and PowerShell. Otherwise, run these with caution, or ask a programmer friend to examine the source code and provide a more detailed description of what a script does for you.
27+
28+
## Credits/Copyright information
29+
30+
- **Preinstallation Environment Helper, Extensibility Suite, Driver Installation Module:** (c) 2024-2025 CodingWonders Software
31+
- **HotInstall:** (c) 2025 CodingWonders Software
32+
- **PXE Helpers:** (c) 2025 CodingWonders Software
33+
- **Compilation Scripts:** (c) 2022 CT Tech Group LLC. Licensed under MIT

Helpers/extps1/PE_Helper/files/diskpart/dp_listdisk.dp

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
Write-Host "Choose your preferred installation method:`n"
2+
Write-Host " 1 - Local Installation"
3+
Write-Host " Choose this method if you started the Preinstallation Environment using local media, such as"
4+
Write-Host " DVD or USB drives. This is recommended for newcomers."
5+
Write-Host " 2 - Network Installation"
6+
Write-Host " Choose this method if you started the Preinstallation Environment using a network-based"
7+
Write-Host " deployment solution. This is recommended for system administrators that want to deploy a system"
8+
Write-Host " image to multiple computers at once."
9+
Write-Host " Note that WDS is only supported at the moment." -ForegroundColor White
10+
Write-Host " S - Shut down my computer"
11+
Write-Host " R - Restart my computer`n"
12+
Write-Host "You will not be able to go back to choose another option after making your decision. You must reboot your"
13+
Write-Host "computer and select the correct option. You can also restart your computer by closing this window.`n"
14+
$option = Read-Host -Prompt "Choose an installation method by typing the option and pressing ENTER"
15+
switch ($option) {
16+
"2" {
17+
Clear-Host
18+
Write-Host "Welcome to the Windows Deployment Services Technology Preview.`n"
19+
Write-Host "The WDS Technology Preview 1 allows you to perform basic operating system deployment using a Windows Deployment"
20+
Write-Host "Services server. The WDS Helper takes care of the installation process.`n"
21+
Write-Host "The WDS Helper follows a client-server architecture. You are about to launch the client component, and it's required"
22+
Write-Host "that you start the server component beforehand. You can find it in the `"pxehelpers\wds`" folder of"
23+
Write-Host "this DVD/USB drive, which you can eject now. The required installation components are already loaded into memory.`n"
24+
Write-Host "Since this is a technology preview, only basic testing has been made in order to make sure that you have a smooth"
25+
Write-Host "experience. Expect to find issues, so don't hesitate to report feedback on this technology to make it better in"
26+
Write-Host "future releases of DISMTools. If you didn't want to select this option, restart your computer.`n"
27+
Write-Host "Once again, thanks for trying the WDS Technology Preview.`n`n"
28+
Write-Host " - CodingWonders Software`n`n"
29+
Write-Host "Press ENTER to start the WDS Helper..."
30+
Read-Host | Out-Null
31+
New-Item -Path "$env:SYSTEMDRIVE\netinstall" | Out-Null
32+
}
33+
"S" {
34+
Start-Process -FilePath "$env:WINDIR\system32\wpeutil.exe" -ArgumentList "shutdown" -NoNewWindow -Wait
35+
}
36+
"R" {
37+
Start-Process -FilePath "$env:WINDIR\system32\wpeutil.exe" -ArgumentList "reboot" -NoNewWindow -Wait
38+
}
39+
}

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ if %debug% equ 1 (
1414
taskmgr
1515
)
1616
powershell -command Set-ExecutionPolicy Unrestricted
17+
if not exist "%sysdrive%\HotInstall" (
18+
powershell -file "%sysdrive%\menu.ps1"
19+
if exist "%sysdrive%\netinstall" (
20+
cd /d "%sysdrive%"\
21+
powershell -file ".\pxehelpers\wds\wdshelper.ps1"
22+
)
23+
)
1724
if %debug% neq 2 if exist "%sysdrive%\HotInstall" (
1825
echo Please insert the disc image and press ENTER...
1926
pause > nul
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
param (
2+
[switch]$Debug,
3+
[switch]$Run,
4+
[switch]$SkipPreprocessing,
5+
[string]$Arguments
6+
)
7+
8+
$workingdir = $PSScriptRoot
9+
10+
Push-Location
11+
Set-Location $workingdir
12+
13+
# Variable to sync between runspaces
14+
$sync = [Hashtable]::Synchronized(@{})
15+
$sync.PSScriptRoot = $workingdir
16+
$sync.configs = @{}
17+
18+
function Update-Progress {
19+
param (
20+
[Parameter(Mandatory, position=0)]
21+
[string]$StatusMessage,
22+
23+
[Parameter(Mandatory, position=1)]
24+
[ValidateRange(0,100)]
25+
[int]$Percent,
26+
27+
[Parameter(position=2)]
28+
[string]$Activity = "Compiling"
29+
)
30+
31+
Write-Progress -Activity $Activity -Status $StatusMessage -PercentComplete $Percent
32+
}
33+
34+
Update-Progress "Pre-req: Running Preprocessor..." 0
35+
36+
# Dot source the 'Invoke-Preprocessing' Function from 'tools/Invoke-Preprocessing.ps1' Script
37+
$preprocessingFilePath = ".\tools\Invoke-Preprocessing.ps1"
38+
. $preprocessingFilePath
39+
40+
$excludedFiles = @("$preprocessingFilePath", '*.png', '*.exe')
41+
$msg = "Pre-req: Code Formatting"
42+
Invoke-Preprocessing -WorkingDir "$workingdir" -ExcludedFiles $excludedFiles -ProgressStatusMessage $msg -ThrowExceptionOnEmptyFilesList -SkipExcludedFilesValidation

Helpers/extps1/PE_Helper/pxehelpers/common/PXEHelpers.Common.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using namespace System.Collections.Generic
2+
13
$global:product = ""
24
$global:description = ""
35

0 commit comments

Comments
 (0)