[Tool] ConvertWin9xSKUs - Convert Windows 9x SKUs (v0.1)

Discussion in 'Windows XP / Older OS' started by example12345678912345678, Feb 10, 2025.

  1. Sajjo

    Sajjo MDL Member

    Feb 6, 2018
    2,711
    3,819
    90
  2. liliactr

    liliactr MDL Addicted

    Sep 3, 2009
    648
    248
    30
    #42 liliactr, Feb 19, 2025
    Last edited: Feb 19, 2025
    You said you created %99.9 same only 2 bytes of ID different. For me same means hexadecimally comparation of cabs different only 2 bytes. Now you say they do not match totaly different. How can it be original packing.

    If you find the right packing way. Just extracting and packing should hexadecimally same files maybe just ID different. If not it is not right way of making cab.

    I have not checked on my pc yet. After check i will decide how original they are.

    Edit: I have checked. It can succesfully creates cabs. Could not succed to patch cabs. Patched 4 bytes i was suspicious gave cab error. Making cab changes more than i think.
     
  3. Babass_

    Babass_ MDL Novice

    Feb 11, 2025
    11
    5
    0
    Looks like what I had to do for floppy version :
    Code:
    .Set DiskLabel1=1
    .Set DiskLabel2=2
    .Set DiskLabel3=3
    Yes this is what we have, exact same files except the ID, that is supposed to be random, but so far I always got the same, even after regenerating the same archive.
     
  4. Sajjo

    Sajjo MDL Member

    Feb 6, 2018
    2,711
    3,819
    90
    It just list filesize of first file (precopy1.cab) and echo this value to directive, you don't need too look up with cabarc.
     
  5. example12345678912345678

    Dec 29, 2019
    600
    364
    30
    Your script did not work for me.
    Can you update the script without dragging and dropping files? Windows did not let me to drag and drop the files in CMD screen. (Maybe I'm on terminal rather than CMD itself.)
    Especially this part:
    Code:
    Microsoft (R) File Expansion Utility
    Copyright (c) Microsoft Corporation. All rights reserved.
    Expanding File precopy2.cab Incomplete, Error Code=0x80070032
     
  6. Sajjo

    Sajjo MDL Member

    Feb 6, 2018
    2,711
    3,819
    90
    No, you just drop the files directly on "1. Unpack and create directive.bat"

    Keep all files in same folder.
    I did'nt made it "advanced"
     
  7. Sajjo

    Sajjo MDL Member

    Feb 6, 2018
    2,711
    3,819
    90
    For the floppy version with 3 precopy cab's
    Code:
    @echo off
    if (%~nx1) neq (PRECOPY1.CAB) (echo Drag and drop PRECOPY1.CAB+PRECOPY2.CAB+PRECOPY3.CAB & pause & exit /b)
    if (%~nx2) neq (PRECOPY2.CAB) (echo Drag and drop PRECOPY1.CAB+PRECOPY2.CAB+PRECOPY3.CAB & pause & exit /b)
    if (%~nx3) neq (PRECOPY3.CAB) (echo Drag and drop PRECOPY1.CAB+PRECOPY2.CAB+PRECOPY3.CAB & pause & exit /b)
    del "Diamond Directive.ddf"
    rmdir /S /Q PRECOPY1
    7z.exe x -aos -o%~n1 %1
    echo ; Diamond Directive File >> "Diamond Directive.ddf"
    echo ; >> "Diamond Directive.ddf"
    echo .Option Explicit >> "Diamond Directive.ddf"
    echo .Set SourceDir=".\PRECOPY1" >> "Diamond Directive.ddf"
    echo .Set DiskDirectoryTemplate=".\" >> "Diamond Directive.ddf"
    echo .Set DiskLabel1=1 >> "Diamond Directive.ddf"
    echo .Set DiskLabel2=2 >> "Diamond Directive.ddf"
    echo .Set DiskLabel3=3 >> "Diamond Directive.ddf"
    echo .Set CabinetName1=PRECOPY1.CAB >> "Diamond Directive.ddf"
    echo .Set CabinetName2=PRECOPY2.CAB >> "Diamond Directive.ddf"
    echo .Set CabinetName3=PRECOPY3.CAB >> "Diamond Directive.ddf"
    echo .Set MaxDiskSize1=%~z1 >> "Diamond Directive.ddf"
    echo .Set MaxDiskSize2=%~z2 >> "Diamond Directive.ddf"
    echo .Set CabinetFileCountThreshold=0 >> "Diamond Directive.ddf"
    echo .Set FolderFileCountThreshold=0 >> "Diamond Directive.ddf"
    echo .Set FolderSizeThreshold=1000000 >> "Diamond Directive.ddf"
    echo .Set UniqueFiles=OFF >> "Diamond Directive.ddf"
    echo .Set RptFileName=nul >> "Diamond Directive.ddf"
    echo .Set InfFileName=nul >> "Diamond Directive.ddf"
    echo .Set cabinet=ON >> "Diamond Directive.ddf"
    echo .Set Compress=ON >> "Diamond Directive.ddf"
    echo .Set CompressionType=lzx >> "Diamond Directive.ddf"
    echo .Set CompressionMemory=21 >> "Diamond Directive.ddf"
    echo ;    PRECOPY1.CAB>> "Diamond Directive.ddf"
    for /f "usebackq EOL=. skip=3 delims=: tokens=3" %%i IN (`"expand.exe -D %1"`) do echo%%i>> "Diamond Directive.ddf"
    echo ;    PRECOPY2.CAB>> "Diamond Directive.ddf"
    for /f "usebackq EOL=. skip=3 delims=: tokens=3" %%i IN (`"expand.exe -D %2"`) do echo%%i>> "Diamond Directive.ddf"
    echo ;    PRECOPY3.CAB>> "Diamond Directive.ddf"
    for /f "usebackq EOL=. skip=3 delims=: tokens=3" %%i IN (`"expand.exe -D %3"`) do echo%%i>> "Diamond Directive.ddf"
    
    for /f "delims=" %%a in ('wmic OS Get localdatetime  ^| find "."') do set dt=%%a
    set YYYY=%dt:~0,4%
    set MM=%dt:~4,2%
    set DD=%dt:~6,2%
    set HH=%dt:~8,2%
    set Min=%dt:~10,2%
    set Sec=%dt:~12,2%
    set ts=%YYYY%%MM%%DD%T%HH%%Min%%Sec%
    
    ren %1 "%~nx1.bak.%ts%.CAB"
    ren %2 "%~nx2.bak.%ts%.CAB"
    ren %3 "%~nx3.bak.%ts%.CAB"
    
     
  8. Babass_

    Babass_ MDL Novice

    Feb 11, 2025
    11
    5
    0
    A bit out of topic, but do you know how to replicate 2000/XP files ? I mean, decompress a random file and recompress it with LZX:21 and get 100% the exact same file ?
     
  9. Sajjo

    Sajjo MDL Member

    Feb 6, 2018
    2,711
    3,819
    90
    Hi @Babass_

    No, i have not tried this with 2000/XP files.