Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c410f07
Update assembly information
CodingWonders Oct 10, 2025
ade0796
[ProgressPanel/ImgMount] Remove read-only flag if possible
CodingWonders Oct 10, 2025
a2f60cb
[DynaLog/DynaViewer] Reship .NET 4.8 version with updates
CodingWonders Oct 10, 2025
4d29835
[Unattended answer file/DTSS] Add Disable Notify Sources, modify WinU…
CodingWonders Oct 11, 2025
986e951
[Unattended answer file/DTSS] Add starter script for 2nd Chance OOBE …
CodingWonders Oct 12, 2025
fdda099
[Unattended answer file/DTSS] Add OEM info starter script
CodingWonders Oct 12, 2025
e6bfec9
[Unattended answer file/DTSS] Add Registered Owner/Org Info script
CodingWonders Oct 13, 2025
d8c305f
[EnvVarManager/Helper] Add envvar modification function
CodingWonders Oct 14, 2025
00718b2
[Unattended answer file/ADDS] Fixed user name validation issue
CodingWonders Oct 15, 2025
87298bf
[ServiceManager] Add Service Dependency/Dependent Type Field
CodingWonders Oct 16, 2025
b9b62ba
[PE Helper/PXE Helpers/FOGHS] Rework API setup procedure
CodingWonders Oct 16, 2025
d6bb397
Add high DPI support (#290)
clin1234 Oct 17, 2025
88ef0d8
[DPI] Add higher DPI setting message
CodingWonders Oct 17, 2025
9c620d6
[EnvVarManager] Save envvar modifications (part 2)
CodingWonders Oct 18, 2025
d2b4015
[EnvVarManager] Save envvar modifications (part 3)
CodingWonders Oct 19, 2025
a83e2a7
[ServiceManager] Added failure message
CodingWonders Oct 19, 2025
ec748ae
[PE Helper/PXE Helpers/FOGHS] FOGHS for UNIX
CodingWonders Oct 20, 2025
5484b1d
[Library] Update Markdig to version 0.43.0
CodingWonders Oct 21, 2025
3d591b9
[PE Helper/PXE Helpers/FOGHS] FOGHS for UNIX p. 2
CodingWonders Oct 21, 2025
7e1237a
[EnvVarManager] Complete envvar modifications (part 1)
CodingWonders Oct 21, 2025
0959078
[PE Helper/PXE Helpers/FOGHS] FOGHS for UNIX p. 3
CodingWonders Oct 22, 2025
c4c5754
[Unattended answer file/DTSS] Add QMR starter script
CodingWonders Oct 22, 2025
886c24e
[Unattended answer file] Update UnattendGen
CodingWonders Oct 22, 2025
8ca8d62
[Unattended answer file] Update UnattendGen
CodingWonders Oct 23, 2025
11d13d2
[REL] Update What's New section
CodingWonders Oct 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions DISMTools.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@
<Reference Include="INIFileParser, Version=2.5.2.0, Culture=neutral, PublicKeyToken=79af7b307b65cf3c, processorArchitecture=MSIL">
<HintPath>packages\ini-parser.2.5.2\lib\net20\INIFileParser.dll</HintPath>
</Reference>
<Reference Include="Markdig, Version=0.42.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\Markdig.0.42.0\lib\net462\Markdig.dll</HintPath>
<Reference Include="Markdig, Version=0.43.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\Markdig.0.43.0\lib\net462\Markdig.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Dism, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5bba90053b345501, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.Dism.3.3.12\lib\net40\Microsoft.Dism.dll</HintPath>
Expand Down Expand Up @@ -1213,10 +1213,15 @@
<None Include="docs\search\search_index.json" />
<None Include="docs\sitemap.xml.gz" />
<None Include="Elements\AutoUnattend\StarterScripts\DuringSystemConfiguration\Close First Logon Animation.dtss" />
<None Include="Elements\AutoUnattend\StarterScripts\DuringSystemConfiguration\Set Quick Machine Recovery Settings.dtss" />
<None Include="Elements\AutoUnattend\StarterScripts\DuringSystemConfiguration\Set OEM Information.dtss" />
<None Include="Elements\AutoUnattend\StarterScripts\WhenFirstUserLogsOn\Set Registered Owner and Organization Information.dtss" />
<None Include="Elements\AutoUnattend\StarterScripts\WhenFirstUserLogsOn\Set Personalization Settings.dtss" />
<None Include="Elements\AutoUnattend\StarterScripts\WhenFirstUserLogsOn\Update Microsoft Store Apps.dtss" />
<None Include="Elements\AutoUnattend\StarterScripts\WhenFirstUserLogsOn\Invoke WinUtil configuration.dtss" />
<None Include="Elements\AutoUnattend\StarterScripts\WhenFirstUserLogsOn\Set up a custom wallpaper.dtss" />
<None Include="Elements\AutoUnattend\StarterScripts\WhenUsersLogOnForFirstTime\Disable Second Chance OOBE.dtss" />
<None Include="Elements\AutoUnattend\StarterScripts\WhenUsersLogOnForFirstTime\Disable Windows Notification Sources.dtss" />
<None Include="Helpers\dthelper.bat">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand Down Expand Up @@ -1259,6 +1264,9 @@
<None Include="Helpers\extps1\PE_Helper\files\startup\startnet.cmd">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Helpers\extps1\PE_Helper\files\start_foghs_unix.sh">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Helpers\extps1\PE_Helper\files\SysprepPreparator.zip">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand All @@ -1274,6 +1282,9 @@
<None Include="Helpers\extps1\PE_Helper\pxehelpers\fog\foghelper_server.ps1">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Helpers\extps1\PE_Helper\pxehelpers\fog\foghelper_server_unix.ps1">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Helpers\extps1\PE_Helper\pxehelpers\fog\__ModuleSetup.ps1">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand Down Expand Up @@ -1893,7 +1904,6 @@
</ItemGroup>
<ItemGroup>
<Folder Include="bin\Debug\" />
<Folder Include="Elements\AutoUnattend\StarterScripts\WhenUsersLogOnForFirstTime\" />
<Folder Include="Helpers\extps1\PE_Helper\files\diskpart\" />
<Folder Include="Helpers\extps1\PE_Helper\tools\HotInstall\" />
<Folder Include="Panels\Set_Ops\" />
Expand Down
2 changes: 1 addition & 1 deletion Elements/AutoUnattend/ActiveDirectory/ADDSJoinDialog.vb
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ Public Class ADDSJoinDialog
MsgBox("A domain name must be specified", vbOKOnly + vbCritical)
Return False
End If
If TextBox5.Text = "" Then
If initialUserName = "" Then
MsgBox("A user name must be specified", vbOKOnly + vbCritical)
Return False
End If
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Language: Batch

@echo off
REM This script configures OEM Information that you can see in system information screens.
REM Configure the options below to set manufacturer information.

REM ------ OPTIONS ------
REM - 1. Manufacturer * -
REM - 2. Model -
REM - 3. Support Hours -
REM - 4. Support Phone -
REM - 5. Support URL -
REM - 6. OEM Logo Path -
REM ---------------------
REM * -- Required

SET "OEM_Manufacturer=<Manufacturer here>"
SET "OEM_Model="
SET "OEM_SupportHours="
SET "OEM_SupportPhone="
SET "OEM_SupportURL="
SET "OEM_Logo="

IF DEFINED OEM_Manufacturer ( reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\OEMInformation" /v Manufacturer /t REG_SZ /d "%OEM_Manufacturer%" /f )
IF DEFINED OEM_Model ( reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\OEMInformation" /v Model /t REG_SZ /d "%OEM_Model%" /f )
IF DEFINED OEM_SupportHours ( reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\OEMInformation" /v SupportHours /t REG_SZ /d "%OEM_SupportHours%" /f )
IF DEFINED OEM_SupportPhone ( reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\OEMInformation" /v SupportPhone /t REG_SZ /d "%OEM_SupportPhone%" /f )
IF DEFINED OEM_SupportURL ( reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\OEMInformation" /v SupportURL /t REG_SZ /d "%OEM_SupportURL%" /f )
IF DEFINED OEM_Logo ( reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\OEMInformation" /v Logo /t REG_SZ /d "%OEM_Logo%" /f )
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
Language: Batch

@echo off
REM This script configures Quick Machine Recovery (QMR) settings. QMR is a new recovery
REM method found in Windows 11 24H2 and higher. DO NOT USE SCRIPT IF TARGET IMAGE IS
REM WINDOWS 11 23H2 OR OLDER!
REM
REM QMR is part of the set of features proposed in the Windows Resiliency Initiative,
REM introduced after the CrowdStrike incident.

REM ---------- OPTIONS -----------
REM - 1. Cloud Remediation State - 0 or 1
REM - 2. Auto Remediation State - 0 or 1
REM - 3. Mins. Until Next Check -
REM - 4. Hours Until Next Reboot -
REM - 5. Headless Recovery - 0 or 1
REM ------------------------------
REM NOTES:
REM - Options 3/4 will only take effect if auto remediation is enabled
REM - Cloud Remediation allows the system to scan for solutions on WinRE launch
REM - Auto Remediation allows the system to continue scanning for solutions if the
REM first attempt fails
REM - Headless is undocumented but defined in reagentc XML

SET QMR_CloudRemediation=0
SET QMR_AutoRemediation=0
SET QMR_NextCheckMinutes=30
SET QMR_NextRebootHours=72
SET QMR_Headless=0

REM leave the rest of this script as is

IF NOT DEFINED QMR_CloudRemediation (SET QMR_CloudRemediation=0)
IF NOT DEFINED QMR_AutoRemediation (SET QMR_AutoRemediation=0)
IF NOT DEFINED QMR_NextCheckMinutes (SET QMR_NextCheckMinutes=30)
IF NOT DEFINED QMR_NextRebootHours (SET QMR_NextRebootHours=72)
IF NOT DEFINED QMR_Headless (SET QMR_Headless=0)

REM convert hours to minutes since reagentc xml expects minutes and not hours
SET /A QMR_NextRebootMinutes=%QMR_NextRebootHours% * 60 >nul

SET "REAGENTC_XML=%SYSTEMROOT%\system32\dt_reagentc.xml"

REM we'll save our custom reagentc xml to system32 - since < and > are used in cmd
REM for redirection, we'll escape them like this: ^< ^>
ECHO ^<?xml version='1.0' encoding='utf-8'?^> > %REAGENTC_XML%
ECHO. >> %REAGENTC_XML%
ECHO ^<WindowsRE^> >> %REAGENTC_XML%
ECHO ^<WifiCredential^> >> %REAGENTC_XML%
ECHO ^</WifiCredential^> >> %REAGENTC_XML%
ECHO ^<CloudRemediation state="%QMR_CloudRemediation%"/^> >> %REAGENTC_XML%
ECHO ^<AutoRemediation state="%QMR_AutoRemediation%" totalwaittime="%QMR_NextRebootMinutes%" waitinterval="%QMR_NextCheckMinutes%"/^> >> %REAGENTC_XML%
ECHO ^<Headless state="%QMR_Headless%"/^> >> %REAGENTC_XML%
ECHO ^</WindowsRE^> >> %REAGENTC_XML%

IF EXIST "%REAGENTC_XML%" ( reagentc /setrecoverysettings /path "%REAGENTC_XML%" )
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

# Export your WinUtil configuration file to "winutil-config.json" on the root of the target
# Windows installation.
if ((Test-Connection "christitus.com") -and (Test-Path -Path "$env:SYSTEMDRIVE\winutil-config.json" -PathType Leaf)) {
if ((Test-Connection -ComputerName "christitus.com" -Count 1) -and (Test-Path -Path "$env:SYSTEMDRIVE\winutil-config.json" -PathType Leaf)) {
iex "& { $(irm christitus.com/win) } -Config `"$env:SYSTEMDRIVE\winutil-config.json`" -Run"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Language: Batch

@echo off
REM This script sets up registered user and organization information given the following settings:
REM ---- Settings ----
REM 1. AutoUserInfo - determines whether to set registered owner as the name of the
REM currently signed user (0 | 1)
REM 2. RegisteredUser - the registered owner. This is overridden by AutoUserInfo when
REM set to 1
REM 3. RegisteredOrg - the registered organization. This is optional
REM ------------------
REM By default, software that accesses registered user/org information, if not previously set,
REM will return "user name" and "org name", respectively. It is recommended to run this script
REM only when the first user logs on, because, if run when users log on for the first time,
REM owner information will change every time a user logs on for the first time if the following
REM conditions are met:
REM a) Either:
REM * multiple users are preloaded on a system using the unattended answer file, or
REM * an account, or set of accounts, is added after OS installation
REM b) AutoUserInfo is set to 1. Otherwise, a constant value is used and you will not notice
REM any changes

SET AutoUserInfo=0
SET "RegisteredUser=REGISTERED_USER_HERE"
SET "RegisteredOrg="

REM If we set autouserinfo to 1 we set the registered user to the current user name.
REM For Microsoft accounts, username information may only be the first 5 letters of
REM the user's email address.
IF %AutoUserInfo% EQU 1 (
SET "RegisteredUser=%USERNAME%"
)

IF DEFINED RegisteredUser ( reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion" /v RegisteredOwner /t REG_SZ /d "%RegisteredUser%" /f )
IF DEFINED RegisteredOrg ( reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion" /v RegisteredOrganization /t REG_SZ /d "%RegisteredOrg%" /f )
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Language: Batch

@echo off
REM This script disables the Second Chance Out-of-Box Experience (SCOOBE), responsible for
REM suggesting (again) Microsoft services and subscriptions. This is applied for all users
REM in a system.

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\UserProfileEngagement" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\UserProfileEngagement" /v ScoobeSystemSettingEnabled /t REG_DWORD /d 0 /f
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Language: Batch

@echo off
REM This script disables notifications for the notification sources defined below. Continuing with answer
REM file creation using this script, without any modifications, will disable 4 notification sources in the target
REM Windows image:
REM - Suggested (Windows 10/11) - Microsoft products/services/subscriptions
REM - Startup App Notification (Windows Server 2022+/Windows 11+)
REM - OneDrive (SkyDrive)
REM - Microsoft Account Health
REM To add notification sources to disable in this script, add them to the list below, like this:
REM FOR %%a IN (Windows.SystemToast.Suggested ... <your_source_here>) DO ...
REM The sources you specify will be added to the notifications list in Settings -> System -> Notifications. You can
REM re-enable them if you see fit.

FOR %%a IN (Windows.SystemToast.Suggested Windows.SystemToast.StartupApp Microsoft.SkyDrive.Desktop Windows.SystemToast.AccountHealth) DO (
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\%%a" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\%%a" /v Enabled /t REG_DWORD /d 0 /f
)
88 changes: 88 additions & 0 deletions Elements/EnvVarManagement/EnvironmentVariableHelper.vb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Imports System.IO
Imports Microsoft.Win32
Imports Microsoft.VisualBasic.ControlChars

Module EnvironmentVariableHelper

Expand Down Expand Up @@ -54,4 +55,91 @@ Module EnvironmentVariableHelper
Return envVarList
End Function

Private Function ExportCurrentEnvVarInformation(IsSystemScope As Boolean) As Boolean
If IsSystemScope Then
Dim defaultControlSet As Integer = GetDefaultControlSet("zSYSTEM")

If defaultControlSet = -1 Then
Return False
End If

Return RegistryHelper.ExportRegistryToFile(String.Format("HKLM\zSYSTEM\ControlSet{0}\Control\Session Manager\Environment", defaultControlSet.ToString().PadLeft(3, "0"c)),
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory),
String.Format("SysEnvVarInformation_{0}.reg", Date.UtcNow.ToString("yyyyMMdd-HHmmss")))) = 0
Else
Return RegistryHelper.ExportRegistryToFile("HKLM\zDEFAULT\Environment",
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory),
String.Format("UserEnvVarInformation_{0}.reg", Date.UtcNow.ToString("yyyyMMdd-HHmmss")))) = 0
End If
End Function

Public Function SaveEnvironmentVariables(MountPath As String, VariableList As List(Of EnvironmentVariable)) As Boolean
If VariableList Is Nothing Then Return False

Dim machineVariables As List(Of EnvironmentVariable) = VariableList.Where(Function(variable) variable.Scope = EnvironmentVariable.EnvironmentVariableScope.Machine).ToList(),
userVariables As List(Of EnvironmentVariable) = VariableList.Where(Function(variable) variable.Scope = EnvironmentVariable.EnvironmentVariableScope.User).ToList()

Try
' An interesting discovery is that environment variables can only really be string or expand string values. Even
' if it only contains numeric values, it will be saved as a string.

If RegistryHelper.LoadRegistryHive(Path.Combine(MountPath, "Windows", "system32", "config", "SYSTEM"), "HKLM\zSYSTEM") = 0 Then
' Back up current system env vars
If Not ExportCurrentEnvVarInformation(True) Then
If MsgBox("Current environment variable information for the system scope could not be backed up. Backups are used in case of a mistake during environment variable management. You may continue, but at your own risk." & CrLf & CrLf &
"Applications that rely on these variables may not work correctly, and you will not be able to use previous variable configuration, unless you had previously backed it up by yourself." & CrLf & CrLf &
"Do you want to continue without backing up current variable information?", vbYesNo + vbExclamation, "Environment variable information could not be backed up") = MsgBoxResult.No Then
Return False
End If
End If


Dim defaultControlSet As Integer = RegistryHelper.GetDefaultControlSet("zSYSTEM")
If defaultControlSet > 0 Then
' If we could load the hive, we determine the control set then configure machine vars.
For Each machineVariable In machineVariables
' We'll check if we can expand the environment variables contained within the envvar value. If we could expand them,
' then we go with an expand string. Otherwise we'll go with a string
Dim expandedValue As String = Environment.ExpandEnvironmentVariables(machineVariable.Value)

RegistryHelper.AddRegistryItem(New RegistryItem(String.Format("HKLM\zSYSTEM\ControlSet{0}\Control\Session Manager\Environment",
defaultControlSet.ToString().PadLeft(3, "0"c)),
machineVariable.Name,
If(machineVariable.Value.Equals(expandedValue), RegistryValueKind.String, RegistryValueKind.ExpandString),
machineVariable.Value))
Next
End If
RegistryHelper.UnloadRegistryHive("HKLM\zSYSTEM")
End If

If RegistryHelper.LoadRegistryHive(Path.Combine(MountPath, "Users", "Default", "NTUSER.DAT"), "HKLM\zDEFAULT") = 0 Then
' Back up current user env vars
If Not ExportCurrentEnvVarInformation(False) Then
If MsgBox("Current environment variable information for the user scope could not be backed up. Backups are used in case of a mistake during environment variable management. You may continue, but at your own risk." & CrLf & CrLf &
"Applications that rely on these variables may not work correctly, and you will not be able to use previous variable configuration, unless you had previously backed it up by yourself." & CrLf & CrLf &
"Do you want to continue without backing up current variable information?", vbYesNo + vbExclamation, "Environment variable information could not be backed up") = MsgBoxResult.No Then
Return False
End If
End If

' We don't have to determine control sets here
For Each userVariable In userVariables
Dim expandedValue As String = Environment.ExpandEnvironmentVariables(userVariable.Value)

RegistryHelper.AddRegistryItem(New RegistryItem("HKLM\zDEFAULT\Environment",
userVariable.Name,
If(userVariable.Value.Equals(expandedValue), RegistryValueKind.String, RegistryValueKind.ExpandString),
userVariable.Value))

Next
RegistryHelper.UnloadRegistryHive("HKLM\zDEFAULT")
End If

Catch ex As Exception

Return False
End Try
Return True
End Function

End Module
1 change: 1 addition & 0 deletions Helpers/extps1/PE_Helper/PE_Helper.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ function Start-PEGeneration
Copy-Item -Path "$((Get-Location).Path)\files\README1ST.TXT" -Destination "$((Get-Location).Path)\ISOTEMP\media\README.TXT" -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
Copy-Item -Path "$((Get-Location).Path)\files\*.sh" -Destination "$((Get-Location).Path)\ISOTEMP\media" -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..."
Expand Down
Loading