From 3ca3f2cde329d348dc2ecd44d1ee7b941b0483ea Mon Sep 17 00:00:00 2001 From: Jakob Lichtenberg Date: Wed, 19 Nov 2025 07:18:37 -0800 Subject: [PATCH 1/5] WDKBatchBuild --- PowerTools/WDKBatchBuild/WDKBatchBuild.ps1 | 243 ++++++++++++++++++ .../WDKBatchBuild/WDKBatchBuild_Internal.ps1 | 1 + 2 files changed, 244 insertions(+) create mode 100644 PowerTools/WDKBatchBuild/WDKBatchBuild.ps1 create mode 100644 PowerTools/WDKBatchBuild/WDKBatchBuild_Internal.ps1 diff --git a/PowerTools/WDKBatchBuild/WDKBatchBuild.ps1 b/PowerTools/WDKBatchBuild/WDKBatchBuild.ps1 new file mode 100644 index 000000000..11db4acda --- /dev/null +++ b/PowerTools/WDKBatchBuild/WDKBatchBuild.ps1 @@ -0,0 +1,243 @@ +function Assert-Pwsh { + [CmdletBinding()] + param() + + # Always log current edition and version + Write-Host "Current PowerShell Edition: $($PSVersionTable.PSEdition)" + Write-Host "Current PowerShell Version: $($PSVersionTable.PSVersion)" + + # Check edition + if ($PSVersionTable.PSEdition -ne 'Core') { + throw "This script requires PowerShell (pwsh) Core edition. Current edition: $($PSVersionTable.PSEdition)" + } + + # Optional: enforce minimum version (e.g., 7.0) + if ($PSVersionTable.PSVersion -lt [Version]'7.0') { + throw "This script requires PowerShell 7.0 or later. Current version: $($PSVersionTable.PSVersion)" + } +} + +function Copy-IfMissingSizeTime { + [CmdletBinding()] + param( + [Parameter(Mandatory)][string]$Source, + [Parameter(Mandatory)][string]$Destination + ) + + Write-Host "Copy-IfMissingSizeTime $Source {" + + $ErrorActionPreference = 'Stop' + + # Normalize UNC long path (\\server\share\... -> \\?\UNC\server\share\...) + function To-LongUnc([string]$p) { + if ($p.StartsWith('\\')) { + # Strip leading \\ then rebuild + $trim = $p.TrimStart('\') + return "\\?\UNC\" + $trim + } + return $p + } + + # Use long-path version for source if UNC; destination is local so normal path is fine + $srcPath = if ($Source.StartsWith('\\')) { To-LongUnc $Source } else { $Source } + + # Validate source file + $srcItem = Get-Item -LiteralPath $srcPath -ErrorAction Stop + if ($srcItem.PSIsContainer) { throw "Source '$Source' is a directory; this helper is for single files." } + + # Ensure destination directory exists + + $destDir = Split-Path -LiteralPath $Destination + if ($destDir -and -not (Test-Path -LiteralPath $destDir)) { + New-Item -ItemType Directory -Path $destDir -Force | Out-Null + } + + if (Test-Path -LiteralPath $Destination) { + $dstItem = Get-Item -LiteralPath $Destination + $sameSize = ($srcItem.Length -eq $dstItem.Length) + $sameTime = ($srcItem.LastWriteTimeUtc -eq $dstItem.LastWriteTimeUtc) + + if ($sameSize -and $sameTime) { + Write-Verbose "Skipping: destination matches source by size and timestamp." + Write-Host "Copy-IfMissingSizeTime $Source }" + return $false + } + + # Overwrite if different + Copy-Item -LiteralPath $srcPath -Destination $Destination -Force + # Align timestamp (sometimes Copy-Item preserves; enforce to be sure) + (Get-Item -LiteralPath $Destination).LastWriteTimeUtc = $srcItem.LastWriteTimeUtc + Write-Host "Copy-IfMissingSizeTime $Source }" + return $true + } + else { + # Destination missing -> copy + Copy-Item -LiteralPath $srcPath -Destination $Destination -Force + (Get-Item -LiteralPath $Destination).LastWriteTimeUtc = $srcItem.LastWriteTimeUtc + Write-Host "Copy-IfMissingSizeTime $Source }" + return $true + } + Write-Host "Copy-IfMissingSizeTime $Source }" +} + + +function Copy-IsoContent { + [CmdletBinding()] + param( + [Parameter(Mandatory, Position = 0)] + [ValidateNotNullOrEmpty()] + [string] $IsoPath, + + [Parameter(Mandatory, Position = 1)] + [ValidateNotNullOrEmpty()] + [string] $Destination + ) + + $ErrorActionPreference = 'Stop' + + Write-Host "Copy-IsoContent $IsoPath {" + + # Resolve paths + $isoFull = (Resolve-Path -LiteralPath $IsoPath).ProviderPath + $destFull = if (Test-Path -LiteralPath $Destination) { + (Resolve-Path -LiteralPath $Destination).ProviderPath + } else { + [IO.Path]::GetFullPath($Destination) + } + + # Ensure destination exists + if (-not (Test-Path -LiteralPath $destFull)) { + New-Item -ItemType Directory -Path $destFull -Force | Out-Null + } + + # Mount ISO + $diskImage = Mount-DiskImage -ImagePath $isoFull -PassThru + try { + # Get drive letter + $volume = Get-Volume -DiskImage $diskImage | Where-Object { $_.DriveLetter } | Select-Object -First 1 + if (-not $volume) { + throw "Failed to determine a drive letter for mounted ISO: $isoFull" + } + $src = ($volume.DriveLetter + ':\') + + # Build robocopy args (copy all, keep timestamps, avoid ACLs from ISO, clear R) + $args = @( + "$src", # source + "`"$destFull`"", # destination + '/E', # include empty directories + '/COPY:DAT', # Data, Attr, Timestamps (avoid ACL/Owner from ISO) + '/DCOPY:DAT', # preserve dir timestamps too + '/A-:R', # remove read-only on destination + '/R:2','/W:2', # quick retry policy + '/MT:16', # multithreaded copy + '/NP','/NFL','/NDL', # quieter output + '/XJ' # ignore junctions + ) + + $proc = Start-Process -FilePath 'robocopy.exe' -ArgumentList $args -NoNewWindow -PassThru -Wait + $rc = $proc.ExitCode + + # Robocopy: 0..7 are success-ish; >=8 is failure + if ($rc -ge 8) { + throw "Robocopy failed with exit code $rc." + } + + Write-Host "Copy-IsoContent $IsoPath }" + # Also reflect exit code in $LASTEXITCODE for callers + Set-Variable -Name LASTEXITCODE -Value $rc -Scope Global + #return $rc + return + } + finally { + try { + Dismount-DiskImage -ImagePath $isoFull -ErrorAction Stop | Out-Null + } catch { + Write-Warning "Failed to unmount ISO '$isoFull': $($_.Exception.Message)" + } + } + Write-Host "Copy-IsoContent $IsoPath }" +} + +function WithEWDK { + [CmdletBinding()] + param( + [Parameter(Mandatory, Position = 1)] + [ValidateNotNullOrEmpty()] + [string] $EWDK + ) + + $ErrorActionPreference = 'Stop' + + Write-Host "WithEWDK $EWDK {" + + git clean -xdf + git status --ignored + + if (Test-Path -LiteralPath "D:\wds\EWDK") { + Write-Host "Removing old junction D:\wds\EWDK {" + # Remove-Item -Recurse -Force -ErrorAction Stop -LiteralPath "EWDK" + Remove-Item -LiteralPath "D:\wds\EWDK" -ErrorAction Stop + Write-Host "Removing old junction D:\wds\EWDK }" + } + New-Item -ItemType Junction -Path "D:\wds\EWDK" -Target "D:\wds\EWDKs\$EWDK" + #robocopy /mir /nfl /ndl "D:\wds\EWDKs\$EWDK" "EWDK" + + $CmdScriptPath = "D:\wds\EWDK\BuildEnv\SetupBuildEnv.cmd" + + $pwshArgs = @( + '-NoLogo','-NoProfile', + '-ExecutionPolicy','Bypass', + '-File', 'BuildRec.ps1', + '-Phase','AfterCmd' + ) -join ' ' + + $cmdPayload = ('call "{0}" && pwsh {1} || exit /b %errorlevel%' -f $CmdScriptPath, $pwshArgs) + + Write-Host "& $env:ComSpec /s /c $cmdPayload" + & $env:ComSpec /s /c $cmdPayload + + robocopy /mir /nfl /ndl "wds1" "D:\wds\Runs\$EWDK" + + git clean -xdf + git status --ignored + + Write-Host "Removing junction D:\wds\EWDK {" + Remove-Item -LiteralPath "D:\wds\EWDK" -ErrorAction Stop + Write-Host "Removing junction D:\wds\EWDK }" + + Write-Host "WithEWDK $EWDK }" +} + +Assert-Pwsh + +Set-StrictMode -Version Latest +$ErrorActionPreference = 'Stop' + +cd D:\wds\wds1 + +Write-Host "Copy-IfMissingSizeTime {" +# OneNote: +# https://microsoft.sharepoint.com/teams/SiGMaDPLAT/_layouts/Doc.aspx?sourcedoc={89648DE7-78BA-4E7E-9F70-9257502ED5BD}&wd=target%28Kit%20Version%20Decoder.one%7C48377E65-EE15-4113-94CE-FF331734A26F%2FWDK%20Releases%20%28with%20matching%20SDK%20%26VS%5C%29%7C9663D5A2-0317-49F6-B2F5-DA60F3362227%2F%29&wdpartid={659AAA9F-4377-41A0-85B4-83A40DA14DB6}{1}&wdsectionfileid={90CB00ED-46C6-40E7-82C3-06E920FF4CA7} +# onenote:https://microsoft.sharepoint.com/teams/SiGMaDPLAT/Shared%20Documents/Teams/DPLAT/DDX/Notebooks/PM%20Work%20Area/Kit%20Version%20Decoder.one#WDK%20Releases%20(with%20matching%20SDK%20VS)§ion-id={48377E65-EE15-4113-94CE-FF331734A26F}&page-id={9663D5A2-0317-49F6-B2F5-DA60F3362227}&end + +#Copy-IfMissingSizeTime -Source '\\winbuilds\release\vb_release_svc_prod1\19041.685.201201-2105\amd64fre\iso\iso_EWDK\EWDK_vb_release_svc_prod1_19041_201201-2105.iso' -Destination 'D:\wds\ISOs\EWDK_19041.685.201201-2105.iso' +#Copy-IfMissingSizeTime -Source '\\winbuilds\release\vb_release_svc_im\19041.5738.250408-1639\amd64fre\iso\iso_EWDK\EWDK_vb_release_svc_im_19041_250408-1639.iso' -Destination 'D:\wds\ISOs\EWDK_19041.5738.250408-1639.iso' +#Copy-IfMissingSizeTime -Source '\\winbuilds\release\ge_release\26100.1.240331-1435\amd64fre\iso\iso_EWDK\EWDK_ge_release_26100_240331-1435.iso' -Destination 'D:\wds\ISOs\EWDK_26100.1.240331-1435.iso' +#Copy-IfMissingSizeTime -Source '\\ntdev\Release\ge_release_svc_prod3\26100.6725.250925-1604\amd64fre\iso\iso_EWDK\EWDK_ge_release_svc_prod3_26100_250925-1604.iso' -Destination 'D:\wds\ISOs\EWDK_26100.6725.250925-1604.iso' +Write-Host "Copy-IfMissingSizeTime }" + +Write-Host "Copy-IsoContent {" +#Copy-IsoContent -IsoPath 'D:\wds\ISOs\EWDK_19041.685.201201-2105.iso' -Destination 'D:\wds\EWDKs\EWDK_19041.685.201201-2105' +#Copy-IsoContent -IsoPath 'D:\wds\ISOs\EWDK_19041.685.201201-2105.iso' -Destination 'D:\wds\EWDKs\EWDK_19041.685.201201-2105-copy' +#Copy-IsoContent -IsoPath 'D:\wds\ISOs\EWDK_19041.5738.250408-1639.iso' -Destination 'D:\wds\EWDKs\EWDK_19041.5738.250408-1639' +#Copy-IsoContent -IsoPath 'D:\wds\ISOs\EWDK_26100.1.240331-1435.iso' -Destination 'D:\wds\EWDKs\EWDK_26100.1.240331-1435' +#Copy-IsoContent -IsoPath 'D:\wds\ISOs\EWDK_26100.6725.250925-1604.iso' -Destination 'D:\wds\EWDKs\EWDK_26100.6725.250925-1604' +Write-Host "Copy-IsoContent }" + +Write-Host "Build {" +#WithEWDK 'EWDK_19041.685.201201-2105' +#WithEWDK 'EWDK_19041.685.201201-2105-copy' +#WithEWDK 'EWDK_19041.5738.250408-1639' +#WithEWDK 'EWDK_26100.1.240331-1435' +#WithEWDK 'EWDK_26100.6725.250925-1604' +Write-Host "Build }" diff --git a/PowerTools/WDKBatchBuild/WDKBatchBuild_Internal.ps1 b/PowerTools/WDKBatchBuild/WDKBatchBuild_Internal.ps1 new file mode 100644 index 000000000..f80f36d23 --- /dev/null +++ b/PowerTools/WDKBatchBuild/WDKBatchBuild_Internal.ps1 @@ -0,0 +1 @@ +.\build-AllSamples -Verbose -Samples '^tools.sdv.samples.sdv-faildriver-wdm' -Configurations 'Debug' -Platforms 'x64' From 4fc7af5161c20e59e3683d83ba56d6008ce0bd55 Mon Sep 17 00:00:00 2001 From: Jakob Lichtenberg Date: Wed, 19 Nov 2025 07:21:30 -0800 Subject: [PATCH 2/5] WDKBatchBuild --- PowerTools/WDKBatchBuild/WDKBatchBuild.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PowerTools/WDKBatchBuild/WDKBatchBuild.ps1 b/PowerTools/WDKBatchBuild/WDKBatchBuild.ps1 index 11db4acda..970a550dd 100644 --- a/PowerTools/WDKBatchBuild/WDKBatchBuild.ps1 +++ b/PowerTools/WDKBatchBuild/WDKBatchBuild.ps1 @@ -187,7 +187,7 @@ function WithEWDK { $pwshArgs = @( '-NoLogo','-NoProfile', '-ExecutionPolicy','Bypass', - '-File', 'BuildRec.ps1', + '-File', 'D:\wds\wds1\PowerTools\WDKBatchBuild\BuildRec.ps1', '-Phase','AfterCmd' ) -join ' ' @@ -196,7 +196,7 @@ function WithEWDK { Write-Host "& $env:ComSpec /s /c $cmdPayload" & $env:ComSpec /s /c $cmdPayload - robocopy /mir /nfl /ndl "wds1" "D:\wds\Runs\$EWDK" + robocopy /mir /nfl /ndl "." "D:\wds\Runs\$EWDK" git clean -xdf git status --ignored @@ -239,5 +239,5 @@ Write-Host "Build {" #WithEWDK 'EWDK_19041.685.201201-2105-copy' #WithEWDK 'EWDK_19041.5738.250408-1639' #WithEWDK 'EWDK_26100.1.240331-1435' -#WithEWDK 'EWDK_26100.6725.250925-1604' +WithEWDK 'EWDK_26100.6725.250925-1604' Write-Host "Build }" From 37aa3c5995cdd83efdd8fdca37559ca4a1d1871b Mon Sep 17 00:00:00 2001 From: Jakob Lichtenberg Date: Wed, 19 Nov 2025 07:22:51 -0800 Subject: [PATCH 3/5] WDKBatchBuild --- PowerTools/WDKBatchBuild/WDKBatchBuild.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PowerTools/WDKBatchBuild/WDKBatchBuild.ps1 b/PowerTools/WDKBatchBuild/WDKBatchBuild.ps1 index 970a550dd..59d0ac05c 100644 --- a/PowerTools/WDKBatchBuild/WDKBatchBuild.ps1 +++ b/PowerTools/WDKBatchBuild/WDKBatchBuild.ps1 @@ -187,7 +187,7 @@ function WithEWDK { $pwshArgs = @( '-NoLogo','-NoProfile', '-ExecutionPolicy','Bypass', - '-File', 'D:\wds\wds1\PowerTools\WDKBatchBuild\BuildRec.ps1', + '-File', 'D:\wds\wds1\PowerTools\WDKBatchBuild\WDKBatchBuild_Internal.ps1', '-Phase','AfterCmd' ) -join ' ' From 3a73aba127fb74cb37139ae8089d26096755f2da Mon Sep 17 00:00:00 2001 From: Jakob Lichtenberg Date: Wed, 19 Nov 2025 07:44:41 -0800 Subject: [PATCH 4/5] W'DKBatchBuild --- PowerTools/WDKBatchBuild/README.md | 32 +++++++++++++++++++++ PowerTools/WDKBatchBuild/WDKBatchBuild.ps1 | 33 ++++++++-------------- 2 files changed, 43 insertions(+), 22 deletions(-) create mode 100644 PowerTools/WDKBatchBuild/README.md diff --git a/PowerTools/WDKBatchBuild/README.md b/PowerTools/WDKBatchBuild/README.md new file mode 100644 index 000000000..278ad2efc --- /dev/null +++ b/PowerTools/WDKBatchBuild/README.md @@ -0,0 +1,32 @@ +WDKBatchBuild + +JakobL@2025/11/19 + +Build this repo in "batch mode" using multiple EWDKs. + +Once batch build is complete you will find complete copies of built repo with generated artifacts ready for your favorite diff algorithm. + +Files: +* WDKBatchBuild.ps1 <-- Main script. Change bottom part to refine functionality. +* WDKBatchBuild_Internal.ps1. Auxillary function. + +Tricks: +* Nifty lazy ISO file copy. Only copies if necessary. +* Nifty lazy ISO extraction. Caches EWDKs. Only extracts what is necessary. +* Nifty trick to invoke build environment and build: + * Does following N times: + * Starts out in main PowerShell script + * Calls cmd script EWDK\BuildEnv\SetupBuildEnv.cmd to setup build environment + * Continuation into auxillary PowerShell script + +Warning: +* Will run "clean -xdf" in root of repo thereby wiping out anything not checked in. +* Make sure to check changes to this script in before running. + +Assumptions: +* Requires new pwsh (rather than old powershell). +* Hard coded in script WDKBatchBuild.ps1: + * Repo in D:\wds\wds1 + * Input ISOs in D:\wds\ISOs + * Temporary EWDKs extracted to D:\wds\EWDKs + * Output runs in D:\wds\Runs diff --git a/PowerTools/WDKBatchBuild/WDKBatchBuild.ps1 b/PowerTools/WDKBatchBuild/WDKBatchBuild.ps1 index 59d0ac05c..cd5799a98 100644 --- a/PowerTools/WDKBatchBuild/WDKBatchBuild.ps1 +++ b/PowerTools/WDKBatchBuild/WDKBatchBuild.ps1 @@ -175,12 +175,12 @@ function WithEWDK { if (Test-Path -LiteralPath "D:\wds\EWDK") { Write-Host "Removing old junction D:\wds\EWDK {" - # Remove-Item -Recurse -Force -ErrorAction Stop -LiteralPath "EWDK" + # Remove-Item -Recurse -Force -ErrorAction Stop -LiteralPath "D:\wds\EWDK" Remove-Item -LiteralPath "D:\wds\EWDK" -ErrorAction Stop Write-Host "Removing old junction D:\wds\EWDK }" } New-Item -ItemType Junction -Path "D:\wds\EWDK" -Target "D:\wds\EWDKs\$EWDK" - #robocopy /mir /nfl /ndl "D:\wds\EWDKs\$EWDK" "EWDK" + #robocopy /mir /nfl /ndl "D:\wds\EWDKs\$EWDK" "D:\wds\EWDK" $CmdScriptPath = "D:\wds\EWDK\BuildEnv\SetupBuildEnv.cmd" @@ -215,29 +215,18 @@ $ErrorActionPreference = 'Stop' cd D:\wds\wds1 -Write-Host "Copy-IfMissingSizeTime {" -# OneNote: -# https://microsoft.sharepoint.com/teams/SiGMaDPLAT/_layouts/Doc.aspx?sourcedoc={89648DE7-78BA-4E7E-9F70-9257502ED5BD}&wd=target%28Kit%20Version%20Decoder.one%7C48377E65-EE15-4113-94CE-FF331734A26F%2FWDK%20Releases%20%28with%20matching%20SDK%20%26VS%5C%29%7C9663D5A2-0317-49F6-B2F5-DA60F3362227%2F%29&wdpartid={659AAA9F-4377-41A0-85B4-83A40DA14DB6}{1}&wdsectionfileid={90CB00ED-46C6-40E7-82C3-06E920FF4CA7} -# onenote:https://microsoft.sharepoint.com/teams/SiGMaDPLAT/Shared%20Documents/Teams/DPLAT/DDX/Notebooks/PM%20Work%20Area/Kit%20Version%20Decoder.one#WDK%20Releases%20(with%20matching%20SDK%20VS)§ion-id={48377E65-EE15-4113-94CE-FF331734A26F}&page-id={9663D5A2-0317-49F6-B2F5-DA60F3362227}&end - -#Copy-IfMissingSizeTime -Source '\\winbuilds\release\vb_release_svc_prod1\19041.685.201201-2105\amd64fre\iso\iso_EWDK\EWDK_vb_release_svc_prod1_19041_201201-2105.iso' -Destination 'D:\wds\ISOs\EWDK_19041.685.201201-2105.iso' -#Copy-IfMissingSizeTime -Source '\\winbuilds\release\vb_release_svc_im\19041.5738.250408-1639\amd64fre\iso\iso_EWDK\EWDK_vb_release_svc_im_19041_250408-1639.iso' -Destination 'D:\wds\ISOs\EWDK_19041.5738.250408-1639.iso' -#Copy-IfMissingSizeTime -Source '\\winbuilds\release\ge_release\26100.1.240331-1435\amd64fre\iso\iso_EWDK\EWDK_ge_release_26100_240331-1435.iso' -Destination 'D:\wds\ISOs\EWDK_26100.1.240331-1435.iso' -#Copy-IfMissingSizeTime -Source '\\ntdev\Release\ge_release_svc_prod3\26100.6725.250925-1604\amd64fre\iso\iso_EWDK\EWDK_ge_release_svc_prod3_26100_250925-1604.iso' -Destination 'D:\wds\ISOs\EWDK_26100.6725.250925-1604.iso' -Write-Host "Copy-IfMissingSizeTime }" - Write-Host "Copy-IsoContent {" -#Copy-IsoContent -IsoPath 'D:\wds\ISOs\EWDK_19041.685.201201-2105.iso' -Destination 'D:\wds\EWDKs\EWDK_19041.685.201201-2105' -#Copy-IsoContent -IsoPath 'D:\wds\ISOs\EWDK_19041.685.201201-2105.iso' -Destination 'D:\wds\EWDKs\EWDK_19041.685.201201-2105-copy' -#Copy-IsoContent -IsoPath 'D:\wds\ISOs\EWDK_19041.5738.250408-1639.iso' -Destination 'D:\wds\EWDKs\EWDK_19041.5738.250408-1639' -#Copy-IsoContent -IsoPath 'D:\wds\ISOs\EWDK_26100.1.240331-1435.iso' -Destination 'D:\wds\EWDKs\EWDK_26100.1.240331-1435' -#Copy-IsoContent -IsoPath 'D:\wds\ISOs\EWDK_26100.6725.250925-1604.iso' -Destination 'D:\wds\EWDKs\EWDK_26100.6725.250925-1604' +Copy-IsoContent -IsoPath 'D:\wds\ISOs\EWDK_19041.685.201201-2105.iso' -Destination 'D:\wds\EWDKs\EWDK_19041.685.201201-2105' +Copy-IsoContent -IsoPath 'D:\wds\ISOs\EWDK_19041.685.201201-2105.iso' -Destination 'D:\wds\EWDKs\EWDK_19041.685.201201-2105-copy' +Copy-IsoContent -IsoPath 'D:\wds\ISOs\EWDK_19041.5738.250408-1639.iso' -Destination 'D:\wds\EWDKs\EWDK_19041.5738.250408-1639' +Copy-IsoContent -IsoPath 'D:\wds\ISOs\EWDK_26100.1.240331-1435.iso' -Destination 'D:\wds\EWDKs\EWDK_26100.1.240331-1435' +Copy-IsoContent -IsoPath 'D:\wds\ISOs\EWDK_26100.6725.250925-1604.iso' -Destination 'D:\wds\EWDKs\EWDK_26100.6725.250925-1604' Write-Host "Copy-IsoContent }" Write-Host "Build {" -#WithEWDK 'EWDK_19041.685.201201-2105' -#WithEWDK 'EWDK_19041.685.201201-2105-copy' -#WithEWDK 'EWDK_19041.5738.250408-1639' -#WithEWDK 'EWDK_26100.1.240331-1435' +WithEWDK 'EWDK_19041.685.201201-2105' +WithEWDK 'EWDK_19041.685.201201-2105-copy' +WithEWDK 'EWDK_19041.5738.250408-1639' +WithEWDK 'EWDK_26100.1.240331-1435' WithEWDK 'EWDK_26100.6725.250925-1604' Write-Host "Build }" From 65325d6f8a03f186bc224c1c86e2339d7c64e472 Mon Sep 17 00:00:00 2001 From: Jakob Lichtenberg Date: Wed, 19 Nov 2025 07:51:52 -0800 Subject: [PATCH 5/5] WDKBatchBuild --- PowerTools/WDKBatchBuild/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PowerTools/WDKBatchBuild/README.md b/PowerTools/WDKBatchBuild/README.md index 278ad2efc..124528b95 100644 --- a/PowerTools/WDKBatchBuild/README.md +++ b/PowerTools/WDKBatchBuild/README.md @@ -10,9 +10,10 @@ Files: * WDKBatchBuild.ps1 <-- Main script. Change bottom part to refine functionality. * WDKBatchBuild_Internal.ps1. Auxillary function. -Tricks: +Nifty Tricks: * Nifty lazy ISO file copy. Only copies if necessary. * Nifty lazy ISO extraction. Caches EWDKs. Only extracts what is necessary. +* Nifty NTFS Junction mount of each EWDK to same junction location, so that the EWDK Root is identical for each build. This eliminates any output changes due to EWDK root. * Nifty trick to invoke build environment and build: * Does following N times: * Starts out in main PowerShell script @@ -30,3 +31,6 @@ Assumptions: * Input ISOs in D:\wds\ISOs * Temporary EWDKs extracted to D:\wds\EWDKs * Output runs in D:\wds\Runs + +Issues: +* I suspect that occasionally among other the MSVC toolset's mspdbsrv does not terminate after runs. Leaving active processes. It seems this - much to my surprise - does not prevent removing the NTFS Junction (where as a recursive delete may fail). Report if you see this sort of issue please.