tomasz86 Posted October 3, 2012 Posted October 3, 2012 I found a very strange bug and don't really know why it occurs. I do know how to fix it though. In the HFSLIP's script you can find the following lines:ECHO.&ECHO Locating compressed files in I386 subfoldersSET BASEDIR=%~dp0SOURCESS\I386\DIR/B/AD SOURCESS\I386>WORK\SSSI386SUB0.TXTFINDSTR/VBI "SVCPACK" WORK\SSSI386SUB0.TXT>WORK\SSSI386SUB.TXTFOR /F "DELIMS=" %%Z IN (WORK\SSSI386SUB.TXT) DO DIR/B/S/A-D/ON "SOURCESS\I386\%%Z">>WORK\SSSI386SUBALL.TXT Add a PAUSE at the end of it:ECHO.&ECHO Locating compressed files in I386 subfoldersSET BASEDIR=%~dp0SOURCESS\I386\DIR/B/AD SOURCESS\I386>WORK\SSSI386SUB0.TXTFINDSTR/VBI "SVCPACK" WORK\SSSI386SUB0.TXT>WORK\SSSI386SUB.TXTFOR /F "DELIMS=" %%Z IN (WORK\SSSI386SUB.TXT) DO DIR/B/S/A-D/ON "SOURCESS\I386\%%Z">>WORK\SSSI386SUBALL.TXTPAUSE Now run the script. After it has paused, open the "WORK\SSSI386SUBALL.TXT" file. It will look like this:R:\HFSLIP_test1\SOURCESS\I386\COMPDATA\3COM.HTMR:\HFSLIP_test1\SOURCESS\I386\COMPDATA\3COM.TXTR:\HFSLIP_test1\SOURCESS\I386\COMPDATA\AACRAID.HTMR:\HFSLIP_test1\SOURCESS\I386\COMPDATA\AACRAID.TXTR:\HFSLIP_test1\SOURCESS\I386\COMPDATA\ACCELPRO.HTMetc. Download one of the OnePiece's .NET Framework addons, ex. Onepiece's Microsoft .NET Framework 1.1 SP1 for Windows 2000 with GDR updates TRUE Addon and place it in HFAAO (you may need to rename it to something shorter, ex. "NETFX20.CAB"). Run the script again and wait until it has paused. Check "WORK\SSSI386SUBALL.TXT" again. It will look like this:R:\HFSLIP~1\SOURCESS\I386\COMPDATA\3COM.HTMR:\HFSLIP~1\SOURCESS\I386\COMPDATA\3COM.TXTR:\HFSLIP~1\SOURCESS\I386\COMPDATA\AACRAID.HTMR:\HFSLIP~1\SOURCESS\I386\COMPDATA\AACRAID.TXTR:\HFSLIP~1\SOURCESS\I386\COMPDATA\ACCELPRO.HTMetc.For some reason the short names are used and I can't figure out why (the switched used is just a standard "DIR/B/S/ON").Now the real problem is that this completely breaks updating files from the I386\UNIPROC folder which happens later. The files located in in I386\UNIPROC are the following ones (in Win2k):KERNEL32.DL_MP2UP.CATMP2UP.INFNTDLL.DLLWIN32K.SY_WINSRV.DL_Normally HFSLIP should just update them with the newer versions. Now when the problem from 6) occurs they are not updated. After the script finishes the folder looks like this:KERNEL32.DLLKERNEL32.DL_MP2UP.CATMP2UP.INFNTDLL.DLLWIN32K.SYSWIN32K.SY_WINSRV.DLLWINSRV.DL_The first KERNEL32.DLL is the newly added file while KERNEL32.DL_ is the original one. Unfortunately Windows setup installs the latter which means that the new version is not installed.I don't know why such a strange bug occurs but I do know how to fix it. The following line:FOR /F "DELIMS=" %%Z IN (WORK\SSSI386SUB.TXT) DO DIR/B/S/A-D/ON "SOURCESS\I386\%%Z">>WORK\SSSI386SUBALL.TXTmust be changed to:FOR /F "DELIMS=" %%Z IN (WORK\SSSI386SUB.TXT) DO DIR/B/S/A-D/ON "%~dp0SOURCESS\I386\%%Z">>WORK\SSSI386SUBALL.TXTI would call this bug critical and want to ask for a quick fix (Mim0?) because this completely breaks Win2k installation.
tomasz86 Posted October 4, 2012 Author Posted October 4, 2012 Something seems to get broken at this stage of integrating addons:
tomasz86 Posted June 19, 2013 Author Posted June 19, 2013 (edited) I've finally managed to find the culprit!Using "extract.exe" causes to unpack CAB addons causes the CMD window to use short names. "Extract.exe" is used by HFSLIP only once which is when unpacking CAB addons:This is the full codeFOR /F "DELIMS=" %%I IN ('DIR/B/A-D/ON HFAAO') DO ( IF /I "%%~xI"==".rar" IF EXIST HFTOOLS\RAR.EXE ECHO.&&ECHO Processing %%I&&HFTOOLS\RAR e "HFAAO\%%I" * "%PREP%TEMP\AAO\" >NUL&&CALL :PROCESS_AAO IF /I "%%~xI"==".cab" IF EXIST HFTOOLS\EXTRACT.EXE ECHO.&&ECHO Processing %%I&&HFTOOLS\EXTRACT /E /L TEMP\AAO "HFAAO\%%I" >NUL&&CALL :PROCESS_AAO IF /I NOT "%%~xI"==".rar" IF /I NOT "%%~xI"==".cab" ( IF EXIST HFTOOLS\7ZA.EXE ECHO.&&ECHO Processing %%I&&HFTOOLS\7ZA x "HFAAO\%%I" -o"%PREP%TEMP\AAO" -r >NUL&&CALL :PROCESS_AAO ))After removing parts not related to CAB addons:FOR /F "DELIMS=" %%I IN ('DIR/B/A-D/ON HFAAO') DO ( IF /I "%%~xI"==".cab" IF EXIST HFTOOLS\EXTRACT.EXE ECHO.&&ECHO Processing %%I&&HFTOOLS\EXTRACT /E /L TEMP\AAO "HFAAO\%%I" >NUL&&CALL :PROCESS_AAO)The problem lies here:HFTOOLS\EXTRACT /E /L TEMP\AAO "HFAAO\%%I"I did a simple test doing:DIR/B/S HFAAObefore and after extracting a CAB addon. The result was:1. Before:D:\HFSLIP\TEMP\HFSLIP_test\HFAAO\NETFX11.cab2. After:D:\HFSLIP\TEMP\HFSLIP~2\HFAAO\NETFX11.cab"HFSLIP_test" got changed into "HFSLIP~2" and this causes all the issues which I described in this topic above.The solution to this problem is very simple. Remove this line all together:IF /I "%%~xI"==".cab" IF EXIST HFTOOLS\EXTRACT.EXE ECHO.&&ECHO Processing %%I&&HFTOOLS\EXTRACT /E /L TEMP\AAO "HFAAO\%%I" >NUL&&CALL :PROCESS_AAOand change the next one fromIF /I NOT "%%~xI"==".rar" IF /I NOT "%%~xI"==".cab" (toIF /I NOT "%%~xI"==".rar" (so that the result should beFOR /F "DELIMS=" %%I IN ('DIR/B/A-D/ON HFAAO') DO ( IF /I "%%~xI"==".rar" IF EXIST HFTOOLS\RAR.EXE ECHO.&&ECHO Processing %%I&&HFTOOLS\RAR e "HFAAO\%%I" * "%PREP%TEMP\AAO\" >NUL&&CALL :PROCESS_AAO IF /I NOT "%%~xI"==".rar" ( IF EXIST HFTOOLS\7ZA.EXE ECHO.&&ECHO Processing %%I&&HFTOOLS\7ZA x "HFAAO\%%I" -o"%PREP%TEMP\AAO" -r >NUL&&CALL :PROCESS_AAO ))7-Zip is capable of unpacking CABs so there's no need to use the outdated "extract.exe". In fact, at this point I'd suggest removing the RAR part too, leaving justFOR /F "DELIMS=" %%I IN ('DIR/B/A-D/ON HFAAO') DO ( IF EXIST HFTOOLS\7ZA.EXE ECHO.&&ECHO Processing %%I&&HFTOOLS\7ZA x "HFAAO\%%I" -o"%PREP%TEMP\AAO" -r >NUL&&CALL :PROCESS_AAO)since 7-Zip can process RAR too. Edited June 19, 2013 by tomasz86
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now