[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,461
    60
    #261 George King, Apr 5, 2021
    Last edited: Apr 5, 2021
    (OP)
    Updated to v 1.5.1!

    Code:
    05.04.2021 - v1.5.1 - Fixed permission handling on non-english systems, thanks to SunLion
                     - Changed Administrator to %UserName% in OOBE.cmd
    
    @Gyppie @SunLion @jiafei2427 Please let me know if you are able to build it now. I would like to fix all what can be fixed so I can focus on my Windows 6.1 project :) And if there are still problem, report me Host language and I can try to install your host system on testing laptop to encounter same errors
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. SunLion

    SunLion MDL Addicted

    May 11, 2011
    797
    2,225
    30
    See this image of Windows XP installed on VirtualBox:

    Administrador.JPG

    Listed as "Documents and Settings\Administrador"
     
  3. Gyppie

    Gyppie MDL Junior Member

    Aug 16, 2009
    50
    11
    0
    Alomst there. I have tried to create Norwegian and English modern installer. Everything in the script works well up until creating ESD. The script makes an ISO without install.esd. So I tried to put the install.wim that is in the XP2ESD folder into the ISO and test it in virtualbox, but get a error message after it tries to unpack and install the wim file. The error code is:0x80071128.

    I'm using Norwegian Win 10 Pro 20h2 x64.

    Code:
                                                                                       Started on 05.04.2021 at 18:47:15,00
    
       [1] Extracting WinXP_Pro_VL.iso
             Microsoft Windows XP Professional Volume License ENU
       [2] Integrating UpdatePack
       [3] Adding Auto-Sysprep
       [4] Building ISO
       [5] Installing into VirtualBox
       [6] Mounting VHD
       [7] Capturing image
       [8] Exporting image
    
    
                                                                                       Started on 05.04.2021 at 19:18:10,79
     Windows XP Modern Intaller
    
       [1] Extracting Windows 7 & 10 ISO
       [2] Building setup structure
             Copying installers
             Building bootloader
       [3] Upgrading setup engine
       [4] Patching setup design
       [5] Patching autorun.dll
       [6] Compressing boot.wim
       [7] Creating skiprecovery.xml + autounattend.xml
       [8] Updating install.wim
       [9] Compressing install.esd
    [ERROR] The root of the WIM image is not a directory!
    ERROR: Exiting with error code 21:
           The metadata resource is invalid.
      [10] Building bootable ISO
                                                                                      Finished on 05.04.2021 at 19:23:48,31
    
     Process finished, press any key to exit...
    
    Code:
                                                                                       Started on 05.04.2021 at 19:55:54,45
    
       [1] Extracting WinXP_Pro_VL.iso
             Microsoft Windows XP Professional Volume License NOR
       [2] Integrating UpdatePack
       [3] Adding Auto-Sysprep
       [4] Building ISO
       [5] Installing into VirtualBox
       [6] Mounting VHD
       [7] Capturing image
       [8] Exporting image
    
    
                                                                                       Started on 05.04.2021 at 20:25:30,67
     Windows XP Modern Intaller
    
       [1] Extracting Windows 7 & 10 ISO
       [2] Building setup structure
             Building bootloader
       [3] Upgrading setup engine
       [4] Patching setup design
       [5] Patching autorun.dll
       [6] Compressing boot.wim
       [7] Creating skiprecovery.xml + autounattend.xml
       [8] Updating install.wim
       [9] Compressing install.esd
    [ERROR] The root of the WIM image is not a directory!
    ERROR: Exiting with error code 21:
           The metadata resource is invalid.
      [10] Building bootable ISO
                                                                                      Finished on 05.04.2021 at 20:29:45,43
    
     Process finished, press any key to exit...
    
     

    Attached Files:

  4. SunLion

    SunLion MDL Addicted

    May 11, 2011
    797
    2,225
    30
    My Host is Windows 10.17763 X64

    To install 32-bit windows on VirtualBox 5.2.30 I had to configure a few things:

    > Settings> System> Motherboard> Check "Enable I/O APIC"

    > Settings> System> Processor> Check "Enable PAE/NX"


    Without it, it would always be wrong!

    Check if this is your problem!
     
  5. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,461
    60
    #265 George King, Apr 5, 2021
    Last edited: Apr 5, 2021
    (OP)
    @Gyppie Change target format ESD to WIM in config.ini to see if WIM build is installable. I'm going to find whats wrong with ESD compression on your side. Bad is I have no idea why it happends...

    EDIT: Please inspect your install.wim with 7z to see if it look good and XP is captured correctly, but building target with WIM should be enough for test

    This is part where is ESD compression
    Code:
    if "%TARGETFORMAT%" == "ESD" ( 
        echo    [9] Compressing install.esd
        "%~dp0apps\WimLib\%ARCH%\wimlib-imagex.exe" export "%~dp0_output\sources\install.wim" all "%~dp0_output\sources\install.esd" --compress=LZMS --solid >nul
        del /q /s "%~dp0_output\sources\install.wim" >nul
    ) ELSE (
        echo    [9] Compressing install.wim
        "%~dp0apps\WimLib\%ARCH%\wimlib-imagex.exe" optimize "%~dp0_output\sources\install.wim" --compress=LZX:100 >nul
    )
    
    
     
    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,461
    60
    #266 George King, Apr 5, 2021
    Last edited: Apr 5, 2021
    (OP)
    I forgot to add PAE option into creating VirtualBox VM, will add it for next.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Gyppie

    Gyppie MDL Junior Member

    Aug 16, 2009
    50
    11
    0
    I tried with setting the target format to WIM, but still got the same error. By inspecting the wim image with 7zip, it looks ok. I will try to build the wim image my self to see if that helps.

    Code:
                                                                                       Started on 05.04.2021 at 23:00:45,63
    
       [1] Extracting WinXP_Pro_VL.iso
             Microsoft Windows XP Professional Volume License NOR
       [2] Integrating UpdatePack
       [3] Adding Auto-Sysprep
       [4] Building ISO
       [5] Installing into VirtualBox
       [6] Mounting VHD
       [7] Capturing image
       [8] Exporting image
    
    
                                                                                       Started on 05.04.2021 at 23:26:28,56
     Windows XP Modern Intaller
    
       [1] Extracting Windows 7 & 10 ISO
       [2] Building setup structure
             Building bootloader
       [3] Upgrading setup engine
       [4] Patching setup design
       [5] Patching autorun.dll
       [6] Compressing boot.wim
       [7] Creating skiprecovery.xml + autounattend.xml
       [8] Updating install.wim
       [9] Compressing install.wim
    [ERROR] The root of the WIM image is not a directory!
    ERROR: Optimization of "D:\_Users\Gyppie\Downloads\no_XP2ESD_v1.5.1\_output\sources\install.wim" failed.
    ERROR: Exiting with error code 21:
           The metadata resource is invalid.
      [10] Building bootable ISO
                                                                                      Finished on 05.04.2021 at 23:31:42,66
    
     Process finished, press any key to exit...
    
     

    Attached Files:

    • xp.png
      xp.png
      File size:
      155 KB
      Views:
      6
  8. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,461
    60
    Can you upload (mediafire/mega) me your install.wim and send through PM Please?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. Gyppie

    Gyppie MDL Junior Member

    Aug 16, 2009
    50
    11
    0
    I just send you a pm with the link to the wim file XP2ESD made. I extracted that wim file, and used dism to capture a new image. Now it installs as normal. Somehow the xp2esd script corrupts the wim file on creation. It happens every time.

    I did not use dism that was located in the script folder to rebuild, but dism from waik 19041.
     
  10. SunLion

    SunLion MDL Addicted

    May 11, 2011
    797
    2,225
    30
    @Gyppie and @George King

    After a few tests, it now seems to work well. Gippie's tip was excellent.

    What did I do:

    1 - Updated DISM files to version 19041.1

    2 - In AutoSysprep.cmd I modified, in line 490: set "VirtualMachinePath=C:\Users\SunLion\VirtualBox VMs\XP" (This seems to work better so that there are no pending residues, a problem that was happening here).

    3 - In AutoSysprep.cmd I modified, for my personal use only, line 635:
    set admin=Administrador
    for /f "tokens=*" %%A in ('dir /s /b /a "%ASSIGNLETTER%:\Documents and Settings\%admin%\*.txt*"') do (
    del /q /s /a "%%A" >nul 2>nul
    )


    Let's continue testing and see if it helps!
     
  11. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,461
    60
    Tool updated to v1.5.2

    Code:
    08.04.2021 - v1.5.2 - Added PAE option into VirtualBox VM creation
                     - Fixed WIM/ESD compression bug that was caused by DISM VHD mounting method, reverted back to DiskPart method
    
    Thanks to all who helped in this findings!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,461
    60
    Interesting is you fixed problem by using newer DISM. But DISM needs to be max from Windows 8.0 as it's latest one that run under XP. I will see if latest files from updated Windows 8.0 fix this weird bug.
    For now I reverted back to DiskPart mounting.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,461
    60
    @Gustavox10

    There should be two reasons.

    1) Too less RAM amount
    2) 7 + 10 + XP Languages mismatch with combination of bad image flag on install.wim / install.esd or missing License.rtf

    Language that must be same for all used ISOs, in my scenario en-US, in your es-ES or fr-FR (I don't know what language is it)?
    Home is my image flag so it must match folder in license folder. This is automated in Builder.
    Code:
    D:\XP2ESD\install.wim\Windows\system32\en-US\Licenses\_Default\Home\License.rtf
    I guess it's first problem?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. jiafei2427

    jiafei2427 MDL Member

    Nov 26, 2020
    213
    58
    10
    Looks like I'll have time to test it in a few days. Thank you for your work .
     
  15. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,461
    60
    I fixed this for next, It was caused as search pattern XP or 2K3 is case sensitive. So I added lowercase pattern too.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. ederfernandez

    ederfernandez MDL Junior Member

    Oct 26, 2012
    62
    31
    0
    Is there a step by step tutorial how to do this? It's very hard to understand what to do next, what's the order etc...
     
  17. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,461
    60

    1) Download and extract tool
    2) Place UpdatePacks into updates folder
    3) Place XP, 7 & 10 ISOs into repository folder
    4) Run XP2ESD_Builder.cmd

    P.S. Don't forget to have installed VirtualBox and see config.ini
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. ederfernandez

    ederfernandez MDL Junior Member

    Oct 26, 2012
    62
    31
    0
    Did everything, and says install.wim is missing :confused:
     
  19. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,461
    60
    Rename in your XP filename “xp” to “XP” as a workaround. This is bug, updated version which contains some fixes should be soon.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...