Optimize driver download by checking for existing WIM files

Refactors the driver download logic for all manufacturers to first check for the existence of a final `.wim` archive. If a WIM file is found, the download and processing for that model is skipped, significantly improving performance on subsequent runs.

This change also resolves a potential type conversion error when processing driver mapping JSON files and corrects a minor typo in a log message.
This commit is contained in:
rbalsleyMSFT
2025-06-27 12:51:51 -07:00
parent 660a619944
commit 1b0c0da677
6 changed files with 63 additions and 34 deletions
+1 -1
View File
@@ -4978,7 +4978,7 @@ try {
}
else {
#Use cached vhdx file
WriteLog 'Using cached VHDX file to speed up build proces'
WriteLog 'Using cached VHDX file to speed up build process'
WriteLog "VHDX file is: $($cachedVHDXInfo.VhdxFileName)"
Robocopy.exe $($VHDXCacheFolder) $($VMPath) $($cachedVHDXInfo.VhdxFileName) /E /COPY:DAT /R:5 /W:5 /J