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

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

  1. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,451
    60
    #2281 George King, Jan 19, 2023
    Last edited: Jan 19, 2023
    (OP)
    I'm back in my home. I'm going to review my notes and work hard on new release.

    I just noticed my new RES patches are not fixed for all languages as stupid MS have broken elements positions on each languages. This will need some time to review.

    But good is I have created fresh 2003 UpdatePack with all possible updates 08-2019 - it can be easily adapted for all languages :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,451
    60
    #2282 George King, Jan 21, 2023
    Last edited: Jan 21, 2023
    (OP)
    Today I performed some tests. I have improved latest build detection for integrated images. More tests are needed, also few compatibily things in UpdatePacks are needed.

    Code:
                                                                                       Started on 21.01.2023 at 12:05:57,82
                                                                                           Auto-Sysprep progress: 1 / 8
       [1] Extracting cs_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73965.iso
             Windows XP Professional Volume License (cs-CZ) SP3 v5.1.2600.5512 x86
       [2] Integrating UpdatePack
       [3] Adding Auto-Sysprep
       [4] Building ISO
       [5] Installing into VirtualBox
       [6] Extracting VHD
             Windows XP Professional Volume License (cs-CZ) SP3 v5.1.2600.7728 x86
       [7] Capturing image
       [8] Exporting image
                                                                                       Started on 21.01.2023 at 12:30:03,43
                                                                                           Auto-Sysprep progress: 2 / 8
       [1] Extracting cs_win_srv_2003_enterprise_with_sp2_vl.iso
             Windows Server 2003 Enterprise Volume License (cs-CZ) SP2 v5.2.3790.3959 x86
       [2] Integrating UpdatePack
       [3] Adding Auto-Sysprep
       [4] Building ISO
       [5] Installing into VirtualBox
       [6] Extracting VHD
             Windows Server 2003 Enterprise Volume License (cs-CZ) SP2 v5.2.3790.6947 x86
       [7] Capturing image
       [8] Exporting image
       [9] Creating Windows XP Professional 2003
                                                                                       Started on 21.01.2023 at 12:52:21,11
                                                                                           Auto-Sysprep progress: 3 / 8
       [1] Extracting cs_win_srv_2003_r2_enterprise_with_sp2_vl.iso
             Windows Server 2003 R2 Enterprise Volume License (cs-CZ) SP2 v5.2.3790.3959 x86
       [2] Integrating UpdatePack
       [3] Adding Auto-Sysprep
       [4] Building ISO
       [5] Installing into VirtualBox
       [6] Extracting VHD
             Windows Server 2003 R2 Enterprise Volume License (cs-CZ) SP2 v5.2.3790.6947 x86
       [7] Capturing image
       [8] Exporting image
                                                                                       Started on 21.01.2023 at 13:14:37,29
                                                                                           Auto-Sysprep progress: 4 / 8
       [1] Extracting en_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73974.iso
             Windows XP Professional Volume License (en-US) SP3 v5.1.2600.5512 x86
       [2] Integrating UpdatePack
       [3] Adding Auto-Sysprep
       [4] Building ISO
       [5] Installing into VirtualBox
       [6] Extracting VHD
             Windows XP Professional Volume License (en-US) SP3 v5.1.2600.7728 x86
       [7] Capturing image
       [8] Exporting image
                                                                                       Started on 21.01.2023 at 13:38:52,90
                                                                                           Auto-Sysprep progress: 5 / 8
       [1] Extracting en_winxp_pro_x64_with_sp2_VOL_20070218_crmpx_x13-41611.iso
             Windows XP Professional Volume License (en-US) SP2 v5.2.3790.3959 x64
       [2] Integrating UpdatePack
       [3] Adding Auto-Sysprep
       [4] Building ISO
       [5] Installing into VirtualBox
       [6] Extracting VHD
             Windows XP Professional Volume License (en-US) SP2 v5.2.3790.6947 x64
       [7] Capturing image
       [8] Exporting image
                                                                                       Started on 21.01.2023 at 14:13:51,78
                                                                                           Auto-Sysprep progress: 6 / 8
       [1] Extracting en_win_srv_2003_enterprise_with_sp2_vl.iso
             Windows Server 2003 Enterprise Volume License (en-US) SP2 v5.2.3790.3959 x86
       [2] Integrating UpdatePack
       [3] Adding Auto-Sysprep
       [4] Building ISO
       [5] Installing into VirtualBox
       [6] Extracting VHD
             Windows Server 2003 Enterprise Volume License (en-US) SP2 v5.2.3790.6947 x86
       [7] Capturing image
       [8] Exporting image
       [9] Creating Windows XP Professional 2003
                                                                                       Started on 21.01.2023 at 14:38:46,06
                                                                                           Auto-Sysprep progress: 7 / 8
       [1] Extracting en_win_srv_2003_r2_enterprise_with_sp2_vl.iso
             Windows Server 2003 R2 Enterprise Volume License (en-US) SP2 v5.2.3790.3959 x86
       [2] Integrating UpdatePack
       [3] Adding Auto-Sysprep
       [4] Building ISO
       [5] Installing into VirtualBox
       [6] Extracting VHD
             Windows Server 2003 R2 Enterprise Volume License (en-US) SP2 v5.2.3790.6947 x86
       [7] Capturing image
       [8] Exporting image
                                                                                       Started on 21.01.2023 at 15:03:41,31
                                                                                           Auto-Sysprep progress: 8 / 8
       [1] Extracting en_win_srv_2003_r2_enterprise_x64_with_sp2_vl.iso
             Windows Server 2003 R2 Enterprise Volume License (en-US) SP2 v5.2.3790.3959 x64
       [2] Integrating UpdatePack
       [3] Adding Auto-Sysprep
       [4] Building ISO
       [5] Installing into VirtualBox
       [6] Extracting VHD
             Windows Server 2003 R2 Enterprise Volume License (en-US) SP2 v5.2.3790.6947 x64
       [7] Capturing image
       [8] Exporting image
                                                                                       Started on 21.01.2023 at 15:39:09,89
     Windows XP Modern Installer
       [1] Extracting
             en_windows_7_ultimate_with_sp1_x64_dvd_u_677332.iso
             Win10_21H2_English_x64.iso
       [2] Building setup structure
             Building bootloader
             Adding DriverPacks support
             Adding Setup folder
             Adding Unattended configurations
       [3] Upgrading setup engine
             Integrating setup drivers
             Integrating setup language packs
                   Integrating cs-CZ
             Integrating setup engine language packs
                   Integrating cs-CZ
       [4] Patching setup design
       [5] Modifying setup launch
       [6] Cleaning boot.wim
       [7] Compressing boot.wim
    "F:\XP2ESD\_output\sources\boot.wim" original size: 159918 KiB
    Using LZX compression with 6 threads
    Archiving file data: 513 MiB of 513 MiB (100%) done
    Calculating integrity table for WIM: 153 MiB of 153 MiB (100%) done
    "F:\XP2ESD\_output\sources\boot.wim" optimized size: 157370 KiB
    Space saved: 2548 KiB
       [8] Updating install.wim
             1. Windows XP Professional Volume License (cs-CZ) x86
                  License files check
                  Applying winlogon patch
                  Applying RunOnceEx icon patch
                  Applying RunOnceEx dialog patch
                  Adding patched ACPI.sys
                      Repacking sp3.cab
             2. Windows Server 2003 Enterprise Volume License (cs-CZ) x86
                  License files check
                  Applying winlogon patch
                  Applying RunOnceEx icon patch
                  Applying RunOnceEx dialog patch
                  Adding patched ACPI.sys
                      Repacking sp2.cab
             3. Windows XP Professional 2003 Volume License (cs-CZ) x86
                  License files check
                  Applying winlogon patch
                  Applying RunOnceEx icon patch
                  Applying RunOnceEx dialog patch
                  Adding patched ACPI.sys
                      Repacking sp2.cab
             4. Windows Server 2003 R2 Enterprise Volume License (cs-CZ) x86
                  License files check
                  Applying winlogon patch
                  Applying RunOnceEx icon patch
                  Applying RunOnceEx dialog patch
                  Adding patched ACPI.sys
                      Repacking sp2.cab
             5. Windows XP Professional Volume License (en-US) x86
                  License files check
                  Applying winlogon patch
                  Applying RunOnceEx icon patch
                  Applying RunOnceEx dialog patch
                  Adding patched ACPI.sys
                      Repacking sp3.cab
             6. Windows XP Professional Volume License (en-US) x64
                  License files check
                  Applying RunOnceEx icon patch
                  Applying RunOnceEx dialog patch
                  Adding patched ACPI.sys
                      Repacking sp2.cab
             7. Windows Server 2003 Enterprise Volume License (en-US) x86
                  License files check
                  Applying winlogon patch
                  Applying RunOnceEx icon patch
                  Applying RunOnceEx dialog patch
                  Adding patched ACPI.sys
                      Repacking sp2.cab
             8. Windows XP Professional 2003 Volume License (en-US) x86
                  License files check
                  Applying winlogon patch
                  Applying RunOnceEx icon patch
                  Applying RunOnceEx dialog patch
                  Adding patched ACPI.sys
                      Repacking sp2.cab
             9. Windows Server 2003 R2 Enterprise Volume License (en-US) x86
                  License files check
                  Applying winlogon patch
                  Applying RunOnceEx icon patch
                  Applying RunOnceEx dialog patch
                  Adding patched ACPI.sys
                      Repacking sp2.cab
             10. Windows Server 2003 R2 Enterprise Volume License (en-US) x64
                  License files check
                  Applying RunOnceEx icon patch
                  Applying RunOnceEx dialog patch
                  Adding patched ACPI.sys
                      Repacking sp2.cab
       [9] Compressing ESD
             install.esd
    Using LZMS compression with 6 threads
    Archiving file data: 7955 MiB of 7955 MiB (100%) done
       [10] Building bootable ISO
    OSCDIMG 2.56 CD-ROM and DVD-ROM Premastering Utility
    Copyright (C) Microsoft, 1993-2012. All rights reserved.
    Licensed only for producing Microsoft authorized content.
    Scanning source tree (500 files in 83 directories)
    Scanning source tree complete (983 files in 135 directories)
    Computing directory information complete
    Image file is 11342249984 bytes (before optimization)
    Writing 983 files in 135 directories to F:\XP2ESD\WinXP_AIO_ESD.iso
    100% complete
    Storage optimization saved 189 files, 29175808 bytes (1% of image)
    After optimization, image file is 11315748864 bytes
    Space saved because of embedding, sparseness or optimization = 29175808
    Done.
                                                                                      Finished on 21.01.2023 at 16:00:31,36
     Process finished, press any key to exit...
    


    EDIT: I'm going to test deploying other systems right now. I remember I have implemented patch for Standard Setup Engine that allow it without issue (without patch is impossible and patch can be applied only on latest Windows 10 - 19041). I hope for universal deploying engine on next release :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. UsefulAGKHelper

    UsefulAGKHelper MDL Senior Member

    Aug 28, 2021
    384
    237
    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...
  4. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,451
    60
    #2284 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...
  5. UsefulAGKHelper

    UsefulAGKHelper MDL Senior Member

    Aug 28, 2021
    384
    237
    10
    #2285 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...
  6. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,451
    60
    #2286 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...
  7. UsefulAGKHelper

    UsefulAGKHelper MDL Senior Member

    Aug 28, 2021
    384
    237
    10
    You can also use WinDBG to spot errors too.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. mperu99

    mperu99 MDL Novice

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

    UsefulAGKHelper MDL Senior Member

    Aug 28, 2021
    384
    237
    10
    #2291 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...
  10. UsefulAGKHelper

    UsefulAGKHelper MDL Senior Member

    Aug 28, 2021
    384
    237
    10
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. ruslanshchur

    ruslanshchur MDL Senior Member

    Sep 13, 2020
    417
    95
    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...
  12. UsefulAGKHelper

    UsefulAGKHelper MDL Senior Member

    Aug 28, 2021
    384
    237
    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...
  13. ruslanshchur

    ruslanshchur MDL Senior Member

    Sep 13, 2020
    417
    95
    10
    #2296 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...
  14. UsefulAGKHelper

    UsefulAGKHelper MDL Senior Member

    Aug 28, 2021
    384
    237
    10
    #2297 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...
  15. UsefulAGKHelper

    UsefulAGKHelper MDL Senior Member

    Aug 28, 2021
    384
    237
    10
    #2298 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...
  16. ruslanshchur

    ruslanshchur MDL Senior Member

    Sep 13, 2020
    417
    95
    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...
  17. UsefulAGKHelper

    UsefulAGKHelper MDL Senior Member

    Aug 28, 2021
    384
    237
    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...