[TUTORIAL] How to patch setupapi.dll for most versions + betas

Discussion in 'Windows XP / Older OS' started by example12345678912345678, Jul 6, 2024.

  1. Gelip

    Gelip MDL Senior Member

    Feb 28, 2011
    399
    256
    10
    #21 Gelip, Aug 17, 2024
    Last edited: Aug 17, 2024
  2. example12345678912345678

    Dec 29, 2019
    600
    364
    30
    The project is for installing different editions from supposed edition. For example, you can install Professional Edition from a Server 2003 ISO with this project. All things you have to do is putting Base ISO for version, kernel, language base and Goal ISO is for the edition only. 3790 Server Base + 2600 Professional Goal ISO = 3790 Professional ISO.
    As for the list of files modified:
    • dosnet.inf
    • layout.inf (Not for current public release, but is being edited on private Discord-specific releases for beta-testers)
    • sysoc.inf
    • syssetup.inf
    • txtsetup.sif
    Only dosnet.inf and txtsetup.sif can be edited without any patch. Because they are used for text-mode setup. Rest require patches as they are being used for GUI-mode setup.
     
  3. Gelip

    Gelip MDL Senior Member

    Feb 28, 2011
    399
    256
    10
    Simply use nLite. This is list files modified in I386 folder by nLite on WinXP SP3 VL if select SFC Disable option:
    nLite_mod_SFC.png
    Among them are the ones you mentioned: dosnet.inf, sysoc.inf, syssetup.inf, txtsetup.sif
    and also syssetup.dll
     
  4. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,468
    60
    @Gelip He want to modify other INFs which cause catalog signature error. Thats why he seek for these patches. Should be replicable by touching drivers.inf or battery.inf for example.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Gelip

    Gelip MDL Senior Member

    Feb 28, 2011
    399
    256
    10
    #25 Gelip, Aug 17, 2024
    Last edited: Aug 17, 2024
    @George King
    WinXP does not have a file like drivers.inf
    Test 1 WinXP SP3 VL
    I edited the battery.inf (BATTERY.IN_) file in the ISO file - modified line CmBatt.SvcDesc = "some other text" then I carried out the installation in a virtual machine. In the 39th minute the question arises whether to install a driver that has not passed the compliance tests and after clicking Yes installed OK:
    battery_only.png
    Test 2 WinXP SP3 VL
    Using nLite I was patching files with the SFC Disable option, replacing BATTERY.IN_ then make ISO and test in VM. There are no warnings or errors and the installation is correct. After installation on the disk in C:\WINDOWS\inf is my modified battery.inf file:
    battery_nLite.png
    I don't understand what you have a problem in this topic :confused::confused:
     
  6. example12345678912345678

    Dec 29, 2019
    600
    364
    30
    I knew that SFC_OS.dll is useless. I patched bytes 56565656FF with 33C0EB29FF and skipped file verification in syssetup.dll file. I also patched sfc_os.dll aswell but got unsigned driver warnings.
    I patched bytes 5B0575076A with 5B0590906A in syssetup.dll file. It hid the unsigned driver warnings but this time, no drivers were installed and resulted in 0x0000007b BSOD. But I don't know what to do next.
     
  7. ohault

    ohault MDL Member

    Dec 27, 2022
    227
    71
    10
    Once installed, you have perhaps to re-enable SFC
     
  8. example12345678912345678

    Dec 29, 2019
    600
    364
    30
    I found this binary value.
    Code:
    HKLM\Software\Microsoft\Driver Signing
    Policy = 01
    It is always set to 01. Most likely related to unsigned driver warnings.
    I have to get it to 00 somehow. But I don't know which file sets it to 01. Can somebody help me? Thank you.
     
  9. example12345678912345678

    Dec 29, 2019
    600
    364
    30
    I have decided to create and sign catalog files instead of trying to find patches for every versions (including Betas) because that's pretty much impossible.
    So, I have created some catalogs for example, but I can't get past this error.
    Windows Longhorn Server-2024-09-04-17-45-02.png
    Any help for this will be appreciated. @George King
     
  10. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,468
    60
    @example12345678912345678 I only know how to sign modded drivers. Otherwise, just try to use one patched file for more system versions. I think you can use patched RTM file during setup and then replace it with untouched after setup for example with SP3 version.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. example12345678912345678

    Dec 29, 2019
    600
    364
    30
    Well, you can tell me that too. That might be helpful.