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

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

  1. Sajjo

    Sajjo MDL Member

    Feb 6, 2018
    2,752
    3,883
    90
  2. liliactr

    liliactr MDL Addicted

    Sep 3, 2009
    651
    251
    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,752
    3,883
    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
    603
    370
    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,752
    3,883
    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,752
    3,883
    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,752
    3,883
    90
    Hi @Babass_

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

    Dec 29, 2019
    603
    370
    30
    Released v0.2.
    This release no longer combines precopy1.cab and precopy2.cab in Windows 98 conversions.
    @Sajjo, @liliactr
    You can test this release. Also I'd like to have a suggestion for Windows 95. :)
     
  11. pm67310

    pm67310 MDL Guru

    Sep 6, 2011
    3,559
    2,792
    120
    #54 pm67310, May 25, 2025 at 19:51
    Last edited: May 25, 2025 at 20:03
    Microsoft internal ( bypass key for win95 )
    ProductType=1

    CCP=0
    OEMUP=0


    Edit setuppp.inf

    setting is found in setuppp.inf, usually located in precopy2.cab.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. xkai2013

    xkai2013 MDL Novice

    Mar 16, 2020
    25
    18
    0
    0.2 has a bug for some language versions of Windows 98. For example, Chinese version of Windows 98 has three Precopy cab files. But after conversion, makecab only processed precopy1&2, caused an error message
    Windows 95-2025-05-26-21-16-37.png
     
  13. example12345678912345678

    Dec 29, 2019
    603
    370
    30
    To be honest, I didn't expect some language versions of Windows 98 to have three precopyX.cab files instead of two.
    Thanks for the report. I'll pull the version 0.2, make a 0.2a.
     
  14. xkai2013

    xkai2013 MDL Novice

    Mar 16, 2020
    25
    18
    0
    and 0.2 can't convert Windows Me Chinese version at all. only extracts precopy1.cab to a temp folder. no conversion files generated. I didn't test other language versions of Windows Me yet.
     
  15. xkai2013

    xkai2013 MDL Novice

    Mar 16, 2020
    25
    18
    0
    and 0.2 can't convert Windows Me Chinese version at all. only extracts precopy1.cab to a temp folder. no conversion files generated. I didn't test other language versions of Windows Me yet.
     
  16. Sajjo

    Sajjo MDL Member

    Feb 6, 2018
    2,752
    3,883
    90
    SETUPPP.INF stores the value: ProductType= , UPI= , OEMUP=
    SETUPC.INF stores the value: CCP=

    Retail/OEM "CCP=" (Compliance Checking Program (upgrade)) is Bossman and overrides "OEMUP="
    OEM FPP (Full Packaged Product) can omit "UPI=" and "OEMUP="

    Far as i know...
     
  17. xkai2013

    xkai2013 MDL Novice

    Mar 16, 2020
    25
    18
    0
    #60 xkai2013, May 26, 2025 at 15:12
    Last edited: May 26, 2025 at 15:19
    In addition to every product types, you only need to remember that CCP=1 has Setup perform an upgrade check and CCP=0 ignores this check. But I don't know what "UPI=" does.