George King 9 місяців тому
батько
коміт
9ee7ec2068
1 змінених файлів з 6 додано та 6 видалено
  1. 6 6
      CI/wininstaller/build_installer.cmd

+ 6 - 6
CI/wininstaller/build_installer.cmd

@@ -12,7 +12,7 @@ set "VCMIFolder=VCMI"
 REM Define Inno Setup version
 set InnoSetupVer=6
 
-REM Uncomment this line and set custom UCRT source path, otherwise it will be detected automatically from installed Windows 10 SDK
+REM Uncomment this line and set custom UCRT source path, otherwise latest installed Windows 10 SDK will be used
 REM set "UCRTFilesPath=%ProgFiles%\Windows Kits\10\Redist\10.0.22621.0\ucrt\DLLs"
 
 REM Normally, there is no need to modify anything below this line.
@@ -44,11 +44,11 @@ REM Dynamically locate the UCRT path if not defined
 if not defined UCRTFilesPath (
 	set "UCRTBasePath=!ProgFiles!\Windows Kits\10\Redist"
 	set "UCRTFilesPath="
-	for /d %%d in ("!UCRTBasePath!\*") do (
-		if exist "%%d\ucrt\DLLs" (
-			set "UCRTFilesPath=%%d\ucrt\DLLs"
-		)
-	)
+    for /f "delims=" %%d in ('dir /b /ad /on "!UCRTBasePath!"') do (
+        if exist "!UCRTBasePath!\%%d\ucrt\DLLs" (
+            set "UCRTFilesPath=!UCRTBasePath!\%%d\ucrt\DLLs"
+        )
+    )
 )
 
 REM Verify Inno Setup is installed