[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,458
    60
    #241 George King, Apr 4, 2021
    Last edited: Apr 4, 2021
    (OP)
    Whats your host now? This seems like sigcheck.exe failed to detect file version. There are two things. Can you run sigcheck.exe from cmd without problem? If yes, does exist on your media regedit.exe in i386 directory? As I'm using this to detect correct Windows version.

    Code:
        REM Get Windows Version ID
        for /F "tokens=1,2 delims=." %%A in ('""%~dp0apps\sigcheck\%ARCH%\sigcheck.exe" -n -nobanner -accepteula "%~dp0_output\I386\regedit.exe""') do set WindowsVersion=%%A.%%B
        if "!WindowsVersion!" == "5.1" set "System=XP"
        if "!WindowsVersion!" == "5.2" set "System=2K3"
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Gyppie

    Gyppie MDL Junior Member

    Aug 16, 2009
    50
    11
    0
    I have some problems with your new script too. I havent added anything or made any changes. It seems like the script have trouble with patching files and creating boot.wim, and exporting the wim to esd. My workdir is D:\XP2ESD_v1.5

    Code:
                                                                                       Started on 04.04.2021 at 15:59:15,80
    
       [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 04.04.2021 at 16:22:57,47
     Windows XP Modern Intaller
    
       [1] Extracting Windows 7 & 10 ISO
       [2] Building setup structure
             Building bootloader
       [3] Upgrading setup engine
    Administrators: Ingen tilordninger ble gjort mellom kontonavn og sikkerhets-IDer.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\arunres.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\autorun.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\cmisetup.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\compatprovider.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\cryptosetup.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\diager.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\diagnostic.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\dism.exe - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\dismcore.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\dismcoreps.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\dismhost.exe - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\dismprov.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\drvmgrtn.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\du.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\folderprovider.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\hwcompat.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\hwcompat.txt - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\idwbinfo.txt - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\input.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\locale.nls - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\logprovider.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\msxml6.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\msxml6r.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\ndiscompl.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\nlsbres.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\ntdsupg.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\pidgenx.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\pkeyconfig.xrm-ms - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\pnpibs.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\rollback.exe - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\schema.dat - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\sdbapiu.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\setup.exe - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\SmiEngine.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\spflvrnt.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\spprgrss.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\spwizeng.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\spwizres.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\sqmapi.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\ssshim.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\unattend.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\unbcl.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\upgloader.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\upgreport.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\uxlib.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\uxlibres.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\w32uiimg.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\w32uires.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\wdsclient.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\wdsclientapi.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\wdscore.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\wdscsl.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\wdsimage.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\wdstptc.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\wdsutil.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\win32ui.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\winsetup.dll - Ingen tilgang.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\xmllite.dll - Ingen tilgang.
    Access denied
    Administrators: Ingen tilordninger ble gjort mellom kontonavn og sikkerhets-IDer.
    Systemet finner ikke angitt fil.
       [4] Patching setup design
    Administrators: Ingen tilordninger ble gjort mellom kontonavn og sikkerhets-IDer.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\setup.exe
    Ingen tilgang.
    A duplicate file name exists, or the file
    cannot be found.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\setup.exe
    Ingen tilgang.
    A duplicate file name exists, or the file
    cannot be found.
    ERROR: Systemet finner ikke angitt fil.
    Administrators: Ingen tilordninger ble gjort mellom kontonavn og sikkerhets-IDer.
    ERROR: Systemet finner ikke angitt bane.
    Administrators: Ingen tilordninger ble gjort mellom kontonavn og sikkerhets-IDer.
    Administrators: Ingen tilordninger ble gjort mellom kontonavn og sikkerhets-IDer.
       [5] Patching autorun.dll
    Administrators: Ingen tilordninger ble gjort mellom kontonavn og sikkerhets-IDer.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\autorun.dll
    Ingen tilgang.
    A duplicate file name exists, or the file
    cannot be found.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\autorun.dll
    Ingen tilgang.
    A duplicate file name exists, or the file
    cannot be found.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\autorun.dll
    Ingen tilgang.
    A duplicate file name exists, or the file
    cannot be found.
    C:\Users\Gyppie\AppData\Local\Temp\boot\sources\autorun.dll
    Ingen tilgang.
    A duplicate file name exists, or the file
    cannot be found.
       [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 04.04.2021 at 16:27:47,40
    
     Process finished, press any key to exit...
     
  3. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,458
    60
    @Gyppie
    Nothing crucial was changed in this part of builder. Mostly all changes are in AutoSysprep.cmd or CaptureVHD.cmd.

    What about free space? Can you confirm if there is enough free space on system partition?

    Maybe something goes wrong with mounting boot.wim files? Do you use untouched 7 & 10 ISOs?

    EDIT: Does install.wim exist in XP2ESD root folder? Was is sucesfully created?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. jiafei2427

    jiafei2427 MDL Member

    Nov 26, 2020
    213
    57
    10
    #244 jiafei2427, Apr 4, 2021
    Last edited: Apr 4, 2021
    @George King It seems that because of language issues, I can't integrate by running NLite alone .But ignoring errors can be done .
    Tip: Language does not match.Another problem, Windows XP SP3.iso has to be renamed to recognized .
    zh-hans_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-74070 must be renamed likes winxp_pro.iso Otherwise It told me I couldn't release install. Wim
     
  5. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,458
    60
    Image language is detected from HIVESYS.INF
    Code:
        REM Get default Language
        for /f "tokens=2 delims==" %%i in ('"type "%~dp0_output\i386\HIVESYS.INF" | findstr /b "INSTALL_LANGUAGE""') do set Language=%%i
    
    And translated here into readable human format
    Code:
        REM Get UpdatePack language
        if !Language! == "0401" set "SystemLanguage=ARA"
        if !Language! == "0404" set "SystemLanguage=CHT"
        if !Language! == "0405" set "SystemLanguage=CSY"
        if !Language! == "0406" set "SystemLanguage=DAN"
        if !Language! == "0407" set "SystemLanguage=DEU"
        if !Language! == "0408" set "SystemLanguage=ELL"
        if !Language! == "0409" set "SystemLanguage=ENU"
        if !Language! == "040b" set "SystemLanguage=FIN"
        if !Language! == "040c" set "SystemLanguage=FRA"
        if !Language! == "040d" set "SystemLanguage=HEB"
        if !Language! == "040e" set "SystemLanguage=HUN"
        if !Language! == "0410" set "SystemLanguage=ITA"
        if !Language! == "0411" set "SystemLanguage=JPN"
        if !Language! == "0412" set "SystemLanguage=KOR"
        if !Language! == "0413" set "SystemLanguage=NLD"
        if !Language! == "0414" set "SystemLanguage=NOR"
        if !Language! == "0415" set "SystemLanguage=PLK"
        if !Language! == "0416" set "SystemLanguage=PTB"
        if !Language! == "0419" set "SystemLanguage=RUS"
        if !Language! == "041d" set "SystemLanguage=SVE"
        if !Language! == "041f" set "SystemLanguage=TRK"
        if !Language! == "0804" set "SystemLanguage=CHS"
        if !Language! == "0816" set "SystemLanguage=PTG"
        if !Language! == "0c0a" set "SystemLanguage=ESN"
    
    Is there anything what needs to be changed?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. jiafei2427

    jiafei2427 MDL Member

    Nov 26, 2020
    213
    57
    10
    like this [TOOL] XP2ESD - Create modern Windows XP installer v1.5
     
  7. Gyppie

    Gyppie MDL Junior Member

    Aug 16, 2009
    50
    11
    0
    Install.wim exists in XP2ESD folder. The ISO's are untouched. And there is a couple of TB's of free space. But, if the boot.wim gets mounted, can it be the Windows TrustedInstaller that restrict my admin user to update the boot.wim? I tested it on another machine also with a online ms user account that is administrator. Same result.
     
  8. SunLion

    SunLion MDL Addicted

    May 11, 2011
    750
    2,050
    30
    Hi guys

    I'm a little confused...

    I am not able to create the ISO with version 1.5.

    I am attaching the process LOG and my config.ini file, in addition to images of the contents of WinXP_AIO_ESD.iso created and the location where it was installed in VirtualBox

    Need help!
    Repository.JPG VHDPathInstall.JPG WinXP_AIO_ESD.iso.JPG

    Note that install.wim is not in WinXP_AIO_ESD\Sources ...
     

    Attached Files:

  9. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,458
    60
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,458
    60
    @Gyppie @SunLion

    Seems like you both have same problem according logs. I never tried microsoft online account. I tried XP2ESD on Windows 10 Professional 20H2 x64 with local account and also on direct Administrator account.

    This is interesting that you get "Access is denied". From v1.2 I have added takeown and icacls commands to avoid these problems. Are you sure you run Builder with right click "Run as Administrator"?

    If not is there any difference? I need to replicate this problem to find way to avoid it.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. Gyppie

    Gyppie MDL Junior Member

    Aug 16, 2009
    50
    11
    0
    On my daily user computer I have offline accunt also. This is Win 10 Pro 20h2 x64. I am running this script as an administrator by right click.
     
  12. SunLion

    SunLion MDL Addicted

    May 11, 2011
    750
    2,050
    30
    #252 SunLion, Apr 4, 2021
    Last edited: Apr 4, 2021
    I don't have an online account, I only use offline. I always run the script as an administrator. My system is Windows 10.17763 Enterprise LTSC.

    I noticed that the installation in VirtualBox is done in autosysprep \ virtualbox, while in the config.ini file the path is different: VHDFile=C:\Users\SunLion\VirtualBox VMs\XP\XP.vhd.

    Could this be a conflict?

    I am also using a script with NSUDO to start "XP2ESD_Builder.cmd" with TrustedInstaller rights, as shown below and the nsudo.exe files in a "Bin" folder:

    if "%PROCESSOR_ARCHITECTURE%" equ "x86" set "Arch=x86"
    if "%PROCESSOR_ARCHITECTURE%" equ "AMD64" set "Arch=x64"

    @start /b "XP2ESD_Builder - TrustedInstaller" "%~dp0Bin\%Arch%\NSudo.exe" -U:T -P:E "%~dp0XP2ESD_Builder.cmd"
     
  13. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,458
    60
    Weird, I need to find out problem.

    No, auto-sysprep have it's own location. This is not problem as this is only for CaptureVHD.cmd


    On my side it works great. If you execute takeown / icacls commands in cmd, they works? Can you try manually mount boot.wim somewhere using dism included in apps folder?

    Also you can edit XP2ESD_Builder.cmd to remove >nul to see what failed. Reported problems are after line 150. I hope we should figure it soon.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. SunLion

    SunLion MDL Addicted

    May 11, 2011
    750
    2,050
    30
    I will try to do that
     
  15. SunLion

    SunLion MDL Addicted

    May 11, 2011
    750
    2,050
    30
    OK
    Here are my tests:

    - If you run takeown / icacls commands in cmd, do they work?

    I run the command differently, but it works.
    I modified the takeow commands as below and it worked well:
    example:
    cmd.exe /c takeown /f "%TEMP%\boot\sources\*.*" >nul
    cmd.exe /c icacls "%TEMP%\boot\sources\*.*" /grant *S-1-5-32-544:F


    - Can you try to mount boot.wim manually somewhere using dism included in the application folder?

    YES
    I took the test and it works without errors


    In addition, you can edit XP2ESD_Builder.cmd to remove> null to see what failed.

    Yes. I commented @echo off to get all the results. Follows attached.


    RESULT:

    - The modified takeown commands worked well.

    ERRORS THAT CONTINUE:

    1 - Mounting VHD still doesn't work!
    "The system cannot find the file specified"

    2 - [ERROR] The root of the WIM image is not a directory!

    3 - ERROR: Exiting with error code 21:
    The metadata resource is invalid.
     

    Attached Files:

  16. jiafei2427

    jiafei2427 MDL Member

    Nov 26, 2020
    213
    57
    10
    #256 jiafei2427, Apr 5, 2021
    Last edited: Apr 5, 2021
    It seem to have the same problem, the virtual machine won't end the process, cmd stops at [ 5 ] and no errors were reported .
    By win10ltsb 2006 x86
     
  17. Gyppie

    Gyppie MDL Junior Member

    Aug 16, 2009
    50
    11
    0
    Here are my tests.
     

    Attached Files:

  18. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,458
    60
    #258 George King, Apr 5, 2021
    Last edited: Apr 5, 2021
    (OP)
    Nice, thanks for this. Now I see it's needed to use SID instead of name due translations in some languages. I will update these commands.

    Mountig VHD is in Auto-Sysprep.cmd, maybe some variable is not set correctly?
    Code:
    echo    [6] Mounting VHD
    REM Mount VHD
    if not exist "%TEMP%\VHD-MOUNT" md "%TEMP%\VHD-MOUNT"
    "%~dp0apps\dism\dism.exe" /Mount-Image /ImageFile:"%VirtualMachinePath%\%MachineName%_DISK.%HDDType%" /index:1 /mountdir:"%TEMP%\VHD-MOUNT" >nul
    
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. SunLion

    SunLion MDL Addicted

    May 11, 2011
    750
    2,050
    30
    #259 SunLion, Apr 5, 2021
    Last edited: Apr 5, 2021
    Mountig VHD is in Auto-Sysprep.cmd, maybe some variable is not set correctly?

    From what I've noticed, Mount works correctly.

    In the file "ProcessNo@echo-off_2.txt", I located the error, on line 3118, it occurs during file cleaning, specifically in this command below:

    for /F "tokens=*" %A in ('dir /s /b /a "X:\Documents and Settings\Administrator\*.txt*"') do (del /q /s /a "%A" 1>nul 2>nul )

    I believe it is because of the spelling of "Administrator", because in PTB it would be "Administrador"

    This is just a suspicion, because in other paths of the mounted file it appears correctly, as below:

    REM Remove unneeded files
    (del /q /s /a "X:\Documents and Settings\Administrador\ntuser.dat.LOG" 1>nul 2>nul )



    Regarding variables, I only have doubts about Config.ini, which is stated:

    VHDFile=C:\Users\SunLion\VirtualBox VMs\XP\XP.vhd

    While the file is installed on VirtualBox in the auto-sysprep\VirtualBox path

    EDITED

    Located the command that causes the error above in "Delete LOG files" (AutoSysprep), line 631
     
  20. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,458
    60
    Config.ini VHDFile settings is for manual processing using CaptureVHD.cmd.

    I can't believe MS translated Admin account.. This needs to be modified in OOBE.cmd too. I will upload updated version with fixed permissions handling now as it's most crucial problem.. I still have no idea how to improve logs removal on systems with translated Admin account
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...