The root cause might be a broken Windows10Versions.ini...
Could you post its content here?
I'll try to create a kind of workaround for it, but for testing I'll need your Windows10Versions.ini.
1) Improve the parser and check for invalid values for TMP_BUILDS_ENABLED and TMP_BUILDS_DISABLED
2) add an "if exist" to the cleanup code
I still don't see any reason for a line like this:
- Code: Select all
"..\client\w100-x64\glb\19041\w100-x64"
This would mean that the dir command
- Code: Select all
dir ..\client\w100-x64\glb\19041 /A:-D /B 2>nul
somehow outputs "w100-x64", which it shouldn't do in any case.
The source of the dir command is this line:
- Code: Select all
for /F "delims=" %%i in ('dir ..\client\%1\%2\%%b /A:-D /B 2^>nul') do (
where "%1" is expected to be "w100-x64", "%2" should be "glb" and "%%b" one element of "%TMP_BUILDS_ENABLED%" (in this case 19041, 19041 and 22000).
The "dir"-command should not return anything to the for-loop, if the folder "..\client\%1\%2\%%b" is empty.
EDIT:
I just played around with the "dir"-command a little bit, but wasn't able to reproduce this behaviour in any way. I'm exited to see the ini-file.
An extremely simplified example output looks like this:
- Code: Select all
D:\wsusoffline\tmp>setlocal enableextensions enabledelayedexpansion
D:\wsusoffline\tmp>cd /d "D:\wsusoffline\tmp\"
D:\wsusoffline\tmp>for /F "delims=" %i in ('dir ..\work_folder /A:-D /B 2>nul') do (echo %i )
D:\wsusoffline\tmp>endlocal
D:\wsusoffline\tmp>pause
Drücken Sie eine beliebige Taste . . .
Wer Rechtschreibfehler findet, darf sie behalten oder an den Meistbietenden versteigern. / Everybody finding a misspelling is allowed to keep or sell it.
aker
WSUS Offline Update „Community Edition“
https://gitlab.com/wsusoffline/wsusoffline/-/releases