[TOOL] XP2ESD - Create modern Windows XP installer v1.6.2

Discussion in 'Windows XP / Older OS' started by George King, Jan 8, 2021.

  1. UsefulAGKHelper

    UsefulAGKHelper MDL Senior Member

    Aug 28, 2021
    402
    263
    10
    @George King I have 22H2 Windows 10 ISO, and it should also work to deploy XP from POWIS Launcher without problems.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. George King

    George King MDL Expert

    Aug 5, 2009
    1,963
    2,506
    60
    #2282 George King, Jan 21, 2023
    Last edited: Jan 22, 2023
    (OP)
    Problems are only when you try to deploy other systems (Vista, 7, 8.0, 8.1) using Standard Setup. Setup engine needs to be patched too. I'm happy I succeed with this patch for winsetup.dll for 19041 which is always base for all newer Windows 10 "builds".

    Code:
    REM Suppress /is-serviceable errors, probably only needed on Windows 10 setup engine inside 7 WinPE
    %TAKEOWN% /F "%TEMP%\boot\sources\winsetup.dll" /A >nul
    %ICACLS% "%TEMP%\boot\sources\winsetup.dll" /grant *S-1-5-32-544:F >nul
    for /f "tokens=1-4 delims=." %%A in ('""%WinDir%\system32\cscript.exe" /nologo "%~dp0deployment\fileversion.vbs" "%TEMP%\boot\sources\winsetup.dll""') do (
        if "%%A.%%B" == "10.0" (
         
            REM Windows 10 Universal?
            if exist "%TEMP%\boot\Windows\syswow64" (
             
                REM 21 00 0F 1F 44 00 00 85 F6 0F 88 0F
                REM 21 00 0F 1F 44 00 00 85 F6 EB 04 0F
                REM FF 85 F6 78 6C
                REM FF 85 F6 90 90
             
                "%~dp0apps\bbe\%ARCH%\bbe.exe" -b "/\x21\x00\x0F\x1F\x44\x00\x00\x85\xF6\x0F\x88\x0F/:12" -e "s/\x21\x00\x0F\x1F\x44\x00\x00\x85\xF6\x0F\x88\x0F/\x21\x00\x0F\x1F\x44\x00\x00\x85\xF6\xEB\x04\x0F/" "%TEMP%\boot\sources\winsetup.dll" -o "%TEMP%\boot\sources\winsetup2.dll"
                del "%TEMP%\boot\sources\winsetup.dll"
                ren "%TEMP%\boot\sources\winsetup2.dll" "winsetup.dll"
                "%~dp0apps\bbe\%ARCH%\bbe.exe" -b "/\xFF\x85\xF6\x78\x6C/:5" -e "s/\xFF\x85\xF6\x78\x6C/\xFF\x85\xF6\x90\x90/" "%TEMP%\boot\sources\winsetup.dll" -o "%TEMP%\boot\sources\winsetup2.dll"
                del "%TEMP%\boot\sources\winsetup.dll"
                ren "%TEMP%\boot\sources\winsetup2.dll" "winsetup.dll"
             
            ) else (
         
                REM x86
                REM 50 FF 15 6C 57 29 10 85 DB 0F 88 93
                REM 50 FF 15 6C 57 29 10 85 DB EB 04 93
                REM 80 85 DB 78 35
                REM 80 85 DB 90 90
             
                         
                "%~dp0apps\bbe\%ARCH%\bbe.exe" -b "/\x50\xFF\x15\x6C\x57\x29\x10\x85\xDB\x0F\x88\x93/:12" -e "s/\x50\xFF\x15\x6C\x57\x29\x10\x85\xDB\x0F\x88\x93/\x50\xFF\x15\x6C\x57\x29\x10\x85\xDB\xEB\x04\x93/" "%TEMP%\boot\sources\winsetup.dll" -o "%TEMP%\boot\sources\winsetup2.dll"
                del "%TEMP%\boot\sources\winsetup.dll"
                ren "%TEMP%\boot\sources\winsetup2.dll" "winsetup.dll"
                "%~dp0apps\bbe\%ARCH%\bbe.exe" -b "/\x80\x85\xDB\x78\x35/:5" -e "s/\x80\x85\xDB\x78\x35/\x80\x85\xDB\x90\x90/" "%TEMP%\boot\sources\winsetup.dll" -o "%TEMP%\boot\sources\winsetup2.dll"
                del "%TEMP%\boot\sources\winsetup.dll"
                ren "%TEMP%\boot\sources\winsetup2.dll" "winsetup.dll"
                     
            )
         
        )
     
    )
    "%~dp0apps\PEChecksum.exe" -c "%TEMP%\boot\sources\winsetup.dll" >nul
    
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. UsefulAGKHelper

    UsefulAGKHelper MDL Senior Member

    Aug 28, 2021
    402
    263
    10
    #2283 UsefulAGKHelper, Jan 22, 2023
    Last edited: Jan 22, 2023
    Out of curiosity, how do you even find the right hex code to change in general? This is undocumented. Did you figure it out from dissasembler, strings from hex code or did you receive help from another experienced user?
    I am saying this to ensure that I don't accidentally cause bugs or glitches in a file if hex values were accidentally changed by replacing them with random numbers.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. George King

    George King MDL Expert

    Aug 5, 2009
    1,963
    2,506
    60
    #2284 George King, Jan 22, 2023
    Last edited: Jan 22, 2023
    (OP)
    In setup log you can find where whole process fails. Then you need to load needed file in IDA, find needed function and then game begins. For example this patch was really hard to develop as error comes from different place than patch.

    P.S. This patch is not random :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. UsefulAGKHelper

    UsefulAGKHelper MDL Senior Member

    Aug 28, 2021
    402
    263
    10
    You can also use WinDBG to spot errors too.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. mperu99

    mperu99 MDL Novice

    Sep 9, 2019
    2
    2
    0
    I am missing something.... where is the actual XP2ESD file to download...
     
  7. MilkChan

    MilkChan MDL Addicted

    Mar 8, 2020
    501
    315
    30
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. UsefulAGKHelper

    UsefulAGKHelper MDL Senior Member

    Aug 28, 2021
    402
    263
    10
    #2289 UsefulAGKHelper, Feb 3, 2023
    Last edited: Feb 3, 2023
    Almost 4 and a half hours ago, I managed to install XP (with XP2ESD) from the boot partition (created from the installer on UEFI mode) after MyFactory hung.
    It took a while, but I had to convert the installation from UEFI-GPT to Legacy-MBR manually to get this to work (I had to copy all the boot files to the boot partition and edit them to align with the partition).

    I use the built-in Error Checking tool from the host to repair the guest OS' partitions to avoid errors and also to bypass the check disk.

    I had to re-adjust the partition order and swap MountedDevices driver letters and GUIDs of the Windows and Boot partition to get it to stop MyFactory from looping (but still after that fix, a desktop screen with cursor but without explorer, remained).

    Now that I could get it to stop looping, I started FIRSTBOOT.CMD to start my factory and then it proceeded normally until at the OOBE stage where it kept looping so I had to edit in the registry to disable all the OOBE settings to get it to boot as Administrator, made the user account manually, and then I could use Windows normally.
    Aside from BCD winload showing error 0xc000009a on both Legacy and UEFI mode for XP, I have managed to have an installation of XP2ESD with Boot partition on legacy mode (I managed to get MyFactory to load nicely after swapping the drive letters and GUIDs of the Windows and Boot partition for XP manually using registry).

    NOTE: Keep in mind that MountedDevices only appear after starting the first boot (if you tried to boot MyFactory and it repeatedly loops forever, then after closing the guest OS, you should see the MountedDevices appear on the registry after mounting XP's SYSTEM hive). Creating a copy of taskmgr.exe and renaming it to sethc.exe, you can access the task manager by clicking Shift (about 5 times on the XP guest), then go to File > New Task (Run...) > Browse... > My Computer to see where drive letters of the XP windows partition and the boot partition.
    On MyFactory always ensure that XP's Windows partition is always set to C (from MountedDevices inside XP's registry), if not then MyFactory will be tricked into treating any other partition set as C as the Windows device, leading to the looping errors until the partition letter of the Windows partition is set to C (obviously to change this, you have to do it from the host OS as shown above).

    I don't know if the BootPartition option on XP2ESD will ever be fixed, but I have shown this test to demonstrate that it's possible for the partition letter of the system partition to be changed manually through the registry to get XP from the XP2ESD installation to boot if installed from XP2ESD installer on UEFI mode.
    upload_2023-2-3_22-58-24.png
    upload_2023-2-3_23-0-57.png
    upload_2023-2-3_23-1-27.png
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. UsefulAGKHelper

    UsefulAGKHelper MDL Senior Member

    Aug 28, 2021
    402
    263
    10
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. ruslanshchur

    ruslanshchur MDL Senior Member

    Sep 13, 2020
    417
    99
    10
    Why Windows XP MCE gives a BSOD 0x0000007B after GUI step of installation, though AHCI driver works fine in TXT and GUI setup, and also generic AHCI driver is actually enabled in registry, but why I am getting 0x0000007B BSOD loop when AHCI mode is enabled?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. UsefulAGKHelper

    UsefulAGKHelper MDL Senior Member

    Aug 28, 2021
    402
    263
    10
    NOTE: For better testing backported NVME drivers on XP installation built by XP2ESD on VirtualBox, ensure you don't have many open applications on the host (especially if high memory and/or CPU usage is reported on the host while lots of applications are used simultaneously). In my case, error 10 of any backported nvme driver on XP from VirtualBox is gone if fewer applications are opened on the host. Please keep this in mind whenever you want to test backported NVME drivers for XP on VirtualBox in order to get accurate results.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. ruslanshchur

    ruslanshchur MDL Senior Member

    Sep 13, 2020
    417
    99
    10
    #2294 ruslanshchur, Feb 15, 2023
    Last edited: Feb 15, 2023
    I am tried BTW to test AHCI driver on VMware, and TXT setup and GUI setup does not BSOD, but when going to OOBE, I am getting BSOD 0x0000007B loop on both XP x86 and x64 despite storahci driver is enabled in registry
    I wish that generic NVMe driver will be ported to Vista, bc it is so strange, that there is ported generic NVMe driver for XP, but not for Vista
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. UsefulAGKHelper

    UsefulAGKHelper MDL Senior Member

    Aug 28, 2021
    402
    263
    10
    #2295 UsefulAGKHelper, Feb 15, 2023
    Last edited: Feb 15, 2023
    Try to use the backported NVME driver (intended for XP from XP2ESD) on Vista to see if it works. If it doesn't work, you can request for ntoskrn8.sys compiled for Vista in PM.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. UsefulAGKHelper

    UsefulAGKHelper MDL Senior Member

    Aug 28, 2021
    402
    263
    10
    #2296 UsefulAGKHelper, Feb 15, 2023
    Last edited: Feb 15, 2023
    On Vmware is it booting through the ICH9 chipset or the PIIX3 chipset? On VirtualBox from my experience, I always receive BSOD if any AHCI storage controller driver is booted on XP through the ICH9 chipset, but not if the storage controller driver is booted through the PIIX3 chipset on VirtualBox. So I wonder if changing the chipset in Vmware fixes that problem? And yes I also use the backported Generic AHCI driver from XP2ESD.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. ruslanshchur

    ruslanshchur MDL Senior Member

    Sep 13, 2020
    417
    99
    10
    BTW on your ICH9 chipset does TXT setup and GUI setup works fine?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. UsefulAGKHelper

    UsefulAGKHelper MDL Senior Member

    Aug 28, 2021
    402
    263
    10
    I always receive this BSOD on all storage controllers on VirtualBox if I use the ICH9 chipset on XP. On the PIIX3 chipset TXT setup and GUI obviously would work fine on IDE (if you boot XP original iso from SATA/AHCI, you need to splitstream the backported generic ahci drivers into XP iso to bypass BSOD).
    BSOD.png
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. ruslanshchur

    ruslanshchur MDL Senior Member

    Sep 13, 2020
    417
    99
    10
    Lol I have integrated SATA/AHCI drivers, and TXT and GUI setup would work fine, but when going to OOBE, it does give a BSOD 0x0000007B on both XP x86 and x64
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. UsefulAGKHelper

    UsefulAGKHelper MDL Senior Member

    Aug 28, 2021
    402
    263
    10
    Ensure that the SATA/AHCI drivers are the same and that they weren't overwritten during installation. If the date of creation of the driver is different replace the sys file with the one from the working driver.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...