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

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

  1. jiafei2427

    jiafei2427 MDL Member

    Nov 26, 2020
    213
    57
    10
    #301 jiafei2427, Apr 14, 2021
    Last edited: Apr 14, 2021
    Yes, I didn't make it once in Win7.
    I'm working on it.
    EDIT:Interestingly, vlkey is not used during virtual machine deployment and is recognized as pkeypro. Enter it manually during the OOBE phase .Is the windows version not recognized correctly?
    VL or vl must be included in the ISO naming?
     
  2. jiafei2427

    jiafei2427 MDL Member

    Nov 26, 2020
    213
    57
    10
    Is dism not being called correctly? The default version of the system that applies.
     
  3. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,458
    60
    Yes thats only way how to detect Volume License. I testem it with original ISO naming and custom too. Script looks for VL or vl in filename
    What do you mean? VHD mouting is done using diskpart. I tried to extract VHD instead of mouting and building was success. I will review it on XP host too to, maybe it can be done too with some modifications too
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. jiafei2427

    jiafei2427 MDL Member

    Nov 26, 2020
    213
    57
    10
    #304 jiafei2427, Apr 14, 2021
    Last edited: Apr 14, 2021
    Oh,I see. Monting VHD is failed.
    EDIT:AND CODE
    Code:
    Started on ?? 2021/04/14 at  8:51:37.49
    
       [1] Extracting zh-hans_windows_xp.iso
             Microsoft Windows XP Professional CHS
       [2] Integrating UpdatePack
       [3] Adding Auto-Sysprep
       [4] Building ISO
       [5] Installing into VirtualBox
       [6] Mounting VHD
    Parameters not compatible.
    The system cannot find the drive specified.
    ERROR: The system was unable to find the specified registry key or value.
    ERROR: The system was unable to find the specified registry key or value.
    ERROR: The parameter is incorrect.
    Invalid drive specification
    Invalid drive specification
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    Path not found - X:\
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the drive specified.
    ERROR: The system was unable to find the specified registry key or value.
    ERROR: The parameter is incorrect.
    ERROR: The parameter is incorrect.
    ERROR: The parameter is incorrect.
    ERROR: The parameter is incorrect.
    ERROR: The parameter is incorrect.
       [7] Capturing image
    [ERROR] Can't open "F:\XP2ESD_v1.5.3\captured.wim" read-only: No such file or di
    rectory
    ERROR: Exiting with error code 47:
           Failed to open a file.
       [8] Exporting image
    Could Not Find F:\XP2ESD_v1.5.3\captured.wim
    [ERROR] Can't open "F:\XP2ESD_v1.5.3\install.wim" read-only: No such file or dir
    ectory
    ERROR: Exiting with error code 47:
           Failed to open a file.
    [ERROR] Can't open "F:\XP2ESD_v1.5.3\install.wim" read-only: No such file or dir
    ectory
    ERROR: Exiting with error code 47:
           Failed to open a file.
    [ERROR] Can't open "F:\XP2ESD_v1.5.3\install.wim" read-only: No such file or dir
    ectory
    ERROR: Exiting with error code 47:
           Failed to open a file.
    [ERROR] Can't open "F:\XP2ESD_v1.5.3\install.wim" read-only: No such file or dir
    ectory
    ERROR: Exiting with error code 47:
           Failed to open a file.
    [ERROR] Can't open "F:\XP2ESD_v1.5.3\install.wim" read-only: No such file or dir
    ectory
    ERROR: Exiting with error code 47:
           Failed to open a file.
    
    
    
       Started on ?? 2021/04/14 at 11:20:40.67
     "F:\XP2ESD_v1.5.3\install.wim" doesn't exist
    
     Crucial files missing, add them and try it again
    
     Press any key to exit...
     
  5. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,458
    60
    There must be something done on 7 to be able successfully mount VHD using diskpart. I can try today extracting VHD method on more systems to confirm it works good XP / 7 / 10 too, but it should work and it can be easily switched. It only turns into more free space requirements
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. jiafei2427

    jiafei2427 MDL Member

    Nov 26, 2020
    213
    57
    10
    #306 jiafei2427, Apr 14, 2021
    Last edited: Apr 14, 2021
    Virtual machine log
    EDIT:AutoSysprep.cmd after sets the pauses.
    Everything is going well. @George King What happened? Is the error caused by the virtual disk being interrupted?
    The new code, which I set up like this, just adds a lot of pause .
     

    Attached Files:

  7. jiafei2427

    jiafei2427 MDL Member

    Nov 26, 2020
    213
    57
    10
    Accidentally close the cmd window,So I can't paste it out.
    ISO was successfully generated.
     

    Attached Files:

  8. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,458
    60
    #308 George King, Apr 14, 2021
    Last edited: Apr 14, 2021
    (OP)
    Please wait few hours, I need to finish real job until testing. I updated my script to VHD extracting I was successfull on Windows 7, result should be same on 10 or XP

    EDIT: Testing on 10 now

    EDIT2: Works perfect too
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,458
    60
    #309 George King, Apr 14, 2021
    Last edited: Apr 14, 2021
    (OP)
    Tool updated to v1.5.4

    Now it must work on Windows 7 and newer without problem! Seems like v1.5.x branches are stability and bug fixes a lot :)

    Code:
    14.04.2021 - v1.5.4 - Changed VHD mounting to extracting, now can XP2ESD work without problems on Windows 7 and newer
    
    @jiafei2427 @exe csrss Please let me know how it goes on your side now

    All feedback is welcome!

    P.S. Goal for next is ability to build it on XP too
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. limcm

    limcm MDL Novice

    Sep 14, 2009
    7
    0
    0
    #310 limcm, Apr 15, 2021
    Last edited: Apr 15, 2021
    CAPTUREVHD.CMD
    HDDLabel is case sensitive
    OR ELSE WILL GET STUCK
    AT
    [2] PREPARING FOR CAPTURE
     
  11. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,458
    60
    #311 George King, Apr 15, 2021
    Last edited: Apr 15, 2021
    (OP)
    Exactly yes, and from instructions I write in first post. You can find info about this settings too.
    Code:
    Prepare everything to build
    1) Open config.ini and edit settings for your own, like ISO names, VirtualBox installation path, Mount VHD Letter and target format. Don't change VirtualBox RAM or HDD Label!
    
    OPTIONAL INFO
    Recommended steps for image prepare if want to build it on your own
    4) Before finishing set C:\ label to WXPSysprep - see config.ini for more details
    
    Config.ini
    ; Don't forget when preparing image in VirtualMachine to set C:\ label that match HDDLabel here, if not Capture.cmd won't work - This setting is here also for VirtualBox
    HDDLabel=WXPSysprep
    
    Have you used Sysprep from Auto-Sysprep folder before shutting down your system in VirtualBox? If not, your image will never work on any HW..
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. jiafei2427

    jiafei2427 MDL Member

    Nov 26, 2020
    213
    57
    10
    [3]Upgrading setup engine
    Tip 11 temporary directories are not empty. The following are normal. Successful establishment of esd and iso. Due to my error, I closed the cmd window again. So there's no report. I will continue to test.
     
  13. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,458
    60
    Be sure to reboot before testing and be on Administrator account and keep all WIMs unmounted. They can remain mounted if you canceled builder in bad moment. And for sure clean %TEMP% folder before starting again after this command
    Code:
    dism /cleanup-wim
    
    On my side it works good on fresh install with integrated all updates until 03-2021 (I'm building 04-2021 images right now, but I think there should be really same result) in Windows 7 SP1
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. jiafei2427

    jiafei2427 MDL Member

    Nov 26, 2020
    213
    57
    10
    OK。
     
  15. SunLion

    SunLion MDL Addicted

    May 11, 2011
    750
    2,041
    30
    Good evening everyone!

    I did a test with the new version (1.5.4), with WIM compression option and everything worked very well!
    There was no error.

    I will now do the same, but with ESD compression ...

    My host system is Windows 10 Enterprise LTSC 2019 x64
     
  16. SunLion

    SunLion MDL Addicted

    May 11, 2011
    750
    2,041
    30
    In the test with ESD compression everything went well again, except the exclusion of the folders below after installation.

    When installing WinXP_AIO_ESD.iso, the "driverspack" and "SYSPREP" folders were not excluded from C: \ (see attached image).

    In this test I only modified the option "SKIPOOBE=Yes" in Config.ini
     

    Attached Files:

  17. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,458
    60
    Great report I forgot about cleanup code. It must be moved to different setup phase. This is caused as all of cleanup commands are added in OOBE.cmd
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. jiafei2427

    jiafei2427 MDL Member

    Nov 26, 2020
    213
    57
    10
    The temp directory has been cleaned up, restart the system, under the administrator.
    1.add pause
    Code:
    Started on ?? 2021/04/15 at 20:46:04.82
    
       [1] Extracting zh-hans_windows_xp_vl.iso
             Microsoft Windows XP Professional Volume License CHS
       [2] Integrating UpdatePack
       [3] Adding Auto-Sysprep
       [4] Building ISO
       [5] Installing into VirtualBox
       [6] Extracting VHD
       [7] Capturing image
       [8] Exporting image
    
    
    
       Started on ?? 2021/04/15 at 23:14:53.24
     Windows XP Modern Intaller
    
       [1] Extracting Windows 7 & 10 ISO
       [2] Building setup structure
             Building bootloader
       [3] Upgrading setup engine
    ;pause
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\*.*: The system cannot find th
    e path specified.
    The system cannot find the file specified.
    The file cannot be accessed by the system.
    Press any key to continue . . .
    2.No changes
    Code:
    [1] Extracting zh-hans_windows_xp_vl.iso
             Microsoft Windows XP Professional Volume License CHS
       [2] Integrating UpdatePack
       [3] Adding Auto-Sysprep
       [4] Building ISO
       [5] Installing into VirtualBox
       [6] Extracting VHD
       [7] Capturing image
       [8] Exporting image
    
    
    
       Started on ?? 2021/04/16 at 10:27:31.12
     Windows XP Modern Intaller
    
       [1] Extracting Windows 7 & 10 ISO
       [2] Building setup structure
             Copying DriverPacks
             Building bootloader
       [3] Upgrading setup engine
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\en-US - The directory is not e
    mpty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\eval\ENTERP~2 -
    The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\eval\ENTERP~3 -
    The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\eval\ENTERP~1 -
    The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\eval\HOMEBA~3 -
    The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\eval\HOMEBA~1 -
    The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\eval\HOMEBA~2 -
    The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\eval\HOMEPR~1 -
    The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\eval\HOMEPR~2 -
    The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\eval\HOMEPR~3 -
    The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\eval\PROFES~3 -
    The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\eval\PROFES~1 -
    The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\eval\PROFES~2 -
    The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\eval\Starter - T
    he directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\eval\StarterE -
    The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\eval\StarterN -
    The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\eval\Ultimate -
    The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\eval\ULTIMA~1 -
    The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\eval\ULTIMA~2 -
    The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\OEM\ENTERP~3 - T
    he directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\OEM\ENTERP~1 - T
    he directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\OEM\HOMEBA~1 - T
    he directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\OEM\HOMEBA~3 - T
    he directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\OEM\HOMEBA~2 - T
    he directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\OEM\HOMEPR~1 - T
    he directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\OEM\HOMEPR~2 - T
    he directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\OEM\HOMEPR~3 - T
    he directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\OEM\PROFES~3 - T
    he directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\OEM\PROFES~2 - T
    he directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\OEM\Starter - Th
    e directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\OEM\StarterN - T
    he directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\OEM\Ultimate - T
    he directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\OEM\ULTIMA~2 - T
    he directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\_Default\ENTERP~
    2 - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\_Default\ENTERP~
    1 - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\_Default\HOMEBA~
    3 - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\_Default\HOMEBA~
    1 - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\_Default\HOMEPR~
    1 - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\_Default\HOMEPR~
    2 - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\_Default\HOMEPR~
    3 - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\_Default\PROFES~
    3 - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\_Default\PROFES~
    1 - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\_Default\PROFES~
    2 - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\_Default\Starter
    E - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\_Default\Ultimat
    e - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\_Default\ULTIMA~
    1 - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\zh-CN\_Default\ULTIMA~
    2 - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\_default\eval\ENTERP~2
     - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\_default\eval\ENTERP~1
     - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\_default\eval\HOMEBA~1
     - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\_default\eval\HOMEPR~3
     - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\_default\eval\PROFES~2
     - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\_default\eval\StarterN
     - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\_default\eval\ULTIMA~2
     - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\_default\OEM\ENTERP~2
    - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\_default\OEM\ENTERP~1
    - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\_default\OEM\HOMEBA~2
    - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\_default\OEM\HOMEPR~1
    - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\_default\OEM\HOMEPR~3
    - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\_default\OEM\PROFES~3
    - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\_default\OEM\PROFES~2
    - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\_default\OEM\Starter -
     The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\_default\OEM\StarterN
    - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\_default\OEM\Ultimate
    - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\_default\OEM\ULTIMA~2
    - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\_default\_Default\ENTE
    RP~2 - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\_default\_Default\ENTE
    RP~1 - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\_default\_Default\HOME
    BA~1 - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\_default\_Default\HOME
    BA~3 - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\_default\_Default\HOME
    PR~1 - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\_default\_Default\HOME
    PR~3 - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\_default\_Default\PROF
    ES~3 - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\_default\_Default\PROF
    ES~2 - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\_default\_Default\Ulti
    mate - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\License\_default\_Default\ULTI
    MA~2 - The directory is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\recovery\zh-CN - The directory
     is not empty.
    C:\Users\ADMINI~1\AppData\Local\Temp\boot\sources\zh-CN - The directory is not e
    mpty.
       [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
      [10] Building bootable ISO
    
      Finished on ?? 2021/04/16 at 12:00:00.04
    
     Process finished, press any key to exit...
     
  19. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,458
    60
    #319 George King, Apr 16, 2021
    Last edited: Apr 16, 2021
    (OP)
    @jiafei2427 Well thats weird, I have no idea why it happends. But it's related to sources folder removal in XP2ESD_Builder.cmd starting at line 195
    Code:
    takeown /F "%TEMP%\boot\sources\*.*" >nul
    icacls "%TEMP%\boot\sources\*.*" /grant *S-1-5-32-544:F >nul
    rd /q /s "%TEMP%\boot\sources" >nul
    
    Whats your Windows 7 input ISO?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  20. jiafei2427

    jiafei2427 MDL Member

    Nov 26, 2020
    213
    57
    10
    cn_windows_7_ultimate_with_sp1_x86_dvd_u_677486.iso
    My host system is too.
    Reinstall my system,try it again.