[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
    384
    237
    10
    Try to use WinDBG from a second computer onto the target computer to find the root cause of the BSOD, watch WinDBG tutorials if you don't know how to do it.
     
    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,454
    60
    #2802 George King, Dec 2, 2023
    Last edited: Dec 2, 2023
    (OP)
    I don't have time to burn it in debuging UEFI which is NOT in 1.7 priorities!
    You or other enthousiast will find way how to fix my UEFI mechanims, when you receive testing ISO.

    There are still many common things that must be done... Even my progress looks fine, it's still slow. But most important things seems to be read due a lot of testing on real machines.. :)
     
    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
    Tbh, I kept receiving infinite boot delay with the latest 2.0 acpi.sys on XP x64 (from dietmar/diderius6), I don't know why.
    Try to use the last acpi.sys that worked for you.
     
    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,454
    60
    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
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. UsefulAGKHelper

    UsefulAGKHelper MDL Senior Member

    Aug 28, 2021
    384
    237
    10
    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
    #2807 UsefulAGKHelper, Dec 8, 2023
    Last edited: Dec 9, 2023
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,454
    60
    #2808 George King, Dec 10, 2023
    Last edited: Dec 10, 2023
    (OP)
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. Gelip

    Gelip MDL Senior Member

    Feb 28, 2011
    325
    158
    10
    A very interesting feature :good3:

    I have a question - does Launcher.hta script remove $WINDOWS.~BT & $WINDOWS.~LS folders?
     
  10. UsefulAGKHelper

    UsefulAGKHelper MDL Senior Member

    Aug 28, 2021
    384
    237
    10
    Setup.cmd does that for XP installation.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. Gelip

    Gelip MDL Senior Member

    Feb 28, 2011
    325
    158
    10
    #2811 Gelip, Dec 10, 2023
    Last edited: Dec 10, 2023
    @UsefulAGKHelper
    But is setup.cmd only used when we choose the Standard method instead of XP2ESD?
    After installing, $Windows folders are still on the disk.
     
  12. UsefulAGKHelper

    UsefulAGKHelper MDL Senior Member

    Aug 28, 2021
    384
    237
    10
    @Gelip There's a section on setup.cmd that detects OS extracted from install.wim.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. Gelip

    Gelip MDL Senior Member

    Feb 28, 2011
    325
    158
    10
    Yes, but deleting $WINDOWS folders doesn't work for me. BTW I think that setup.cmd does many unnecessary things to install WinXP 64-bit. I edited him slimming and now works :)
    Code:
    REM Created in 2023 by Gelip
    @ECHO OFF
    TITLE Windows XP SP2 64-bit Setup Launcher
    CLS
    
    REM Get DVD / USB drive
    FOR %%I IN (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST "%%I:\sources\*.esd" SET DRIVE=%%I:&&SET INSTALL=install.esd
    IF "%DRIVE%" == "" FOR %%I IN (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST "%%I:\sources\*.wim" SET DRIVE=%%I:&&SET INSTALL=install.wim
    IF "%DRIVE%" == "" FOR %%I IN (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST "%%I:\sources\*.swm" SET DRIVE=%%I:&&SET INSTALL=install.swm
    
    
    REM Read settings.ini
    call :ReadINI SetupType SetupType
    
    call :ReadINI CustomPartitionID CustomPartitionID
    call :ReadINI PartitionID PartitionID
    
    call :ReadINI DriverPacksType DriverPacksType
    call :ReadINI DriverPacksMethod DriverPacksMethod
    
    call :ReadINI BootPartition BootPartition
    call :ReadINI ModernBoot ModernBoot
    call :ReadINI ModernUEFIBoot ModernUEFIBoot
    call :ReadINI QuibbleUEFIboot QuibbleUEFIboot
    
    call :ReadINI DisableOOBE DisableOOBE
    call :ReadINI DynamicDrivers DynamicDrivers
    
    REM %SystemDrive% = X: aka default WinPE target path
    
    
    
    REM Get parameters from POWIS Launcher
    setlocal enableextensions enabledelayedexpansion
    
    :ReadParameter
    
    for %%F in (/setup: /imagefile: /unattended: /copydrivers: /partitionid: /skipoobe: /pae: /dynamicdrivers:) do (
     
       for /F "tokens=* delims=: " %%P in ('"echo "%1" | findstr /i "\%%F""') do (
           echo %1
           set param=%1
           call set param=!!param:%%F=!!
           call set param=!param:"=!
           echo !param!
         
           if not "!param!" == "" (
               if "%%F" == "/setup:" (
                   set "SelectedSetupFile=!param!"
               ) else if "%%F" == "/imagefile:" (
                   set "SelectedImageFile=!param!"
               ) else if "%%F" == "/unattended:" (
                   set "SelectedUnattendedFile=!param!"
               ) else if "%%F" == "/copydrivers:" (
                   set "CopyDrivers=!param!"
               ) else if "%%F" == "/partitionid:" (
                   set "SelectedPartitionId=!param!"
               ) else if "%%F" == "/skipoobe:" (
                   set "SelectedOOBE=!param!"
               ) else if "%%F" == "/pae:" (
                   set "SelectedPAE=!param!"
               ) else if "%%F" == "/dynamicdrivers:" (
                   set "SelectedDynamicDrivers=!param!"
               )
    
           )
       )
    )
    
    shift
    if not "%~1" == "" goto ReadParameter
    
    
    
    
    REM UEFI detection
    rem for /f "delims=" %%I in ('bcdedit /enum {current} ^| find /i "winload.efi"') do set UEFI=1
    rem for /f "delims=" %%I in ('%WinDir%\system32\efidetect.exe ^| find /i "UEFI"') do set UEFI=1
    
    rem if not "%UEFI%" == "1" (
    rem   set ModernUEFIBoot=No
    rem   set QuibbleUEFIboot=No
    rem )
    
    if defined SelectedSetupFile (
       set SETUPFILE=!SelectedSetupFile!
    ) else (
       if /i "%SetupType%" == "XP2ESD" (
           set SETUPFILE=setupxp.exe
       ) else (
           set SETUPFILE=launcher.exe
       )
    )
    
    if defined SelectedImageFile (
       set "INSTALL=!SelectedImageFile!"
    )
    
    
    set UNATTENDED=autounattend.xml
    if defined SelectedUnattendedFile (
       set "UNATTENDED=!SelectedUnattendedFile!"
    )
    
    
    
    if defined SelectedOOBE (
    
       set "DisableOOBE=!SelectedOOBE!"
    )
    
    REM Run setup
    if exist "!DRIVE!\!UNATTENDED!" (
    
       "%SystemDrive%\sources\!SETUPFILE!" /installfrom:"!DRIVE!\sources\!INSTALL!" /unattend:"%DRIVE%\!UNATTENDED!" /noreboot
    ) else (
       "%SystemDrive%\sources\!SETUPFILE!" /installfrom:"%DRIVE%\sources\%INSTALL%" /noreboot
    )
    
    rem endlocal
    
    
    REM Search partition OS to delete unneeded folders & files
    FOR %%I IN (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST "%%I:\$WINDOWS.~BT" SET TARGET=%%I:
    
    if exist "%TARGET%\$WINDOWS.~BT" rd /q /s "%TARGET%\$WINDOWS.~BT" >nul
    if exist "%TARGET%\$WINDOWS.~LS" rd /q /s "%TARGET%\$WINDOWS.~LS" >nul
    if exist "%TARGET%\1_display_del.bat" del /q "%TARGET%\1_display_del.bat" >nul
    if exist "%TARGET%\*.reg" del /q "%TARGET%\*.reg" >nul
    
    
     
  14. UsefulAGKHelper

    UsefulAGKHelper MDL Senior Member

    Aug 28, 2021
    384
    237
    10
    #2814 UsefulAGKHelper, Dec 10, 2023
    Last edited: Dec 10, 2023
    No offense, but this is not enough for a universal solution in XP2ESD, what may work for you doesn't work for every newer hardware (Coffee Lake and newer).
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. Gelip

    Gelip MDL Senior Member

    Feb 28, 2011
    325
    158
    10
    @UsefulAGKHelper
    Yes you are right.

    I should make a separate topic called e.g. WinXP SP2 64-bit based on XP2ESD
     
  16. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,454
    60
    100% useless as all of us want single universal solution.

    setup.cmd handle all systems not only one.

    Its true that scripts is looks like a mess If don’t know all hidden purposes.

    Btw, and its expectable that setup.cmd doesn’t work correctly for you, due your custom capturing process.

    Just be patient and wait for testing image, then it should be only about few commands.

    There is no need to do anything manually. I have also working EFI bootloader like normal EFI installation. No need to touch efi shell etc.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,454
    60
    Yes, this is really good joke. You simply deleted everything that is needed to make whole proces automated and many more...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. UsefulAGKHelper

    UsefulAGKHelper MDL Senior Member

    Aug 28, 2021
    384
    237
    10
    If you want XP2ESD to work properly, use the same settings provided by XP2ESD and not your own. XP2ESD is designed to work with a VirtualBox VM, not vmware. And you don't need to use XP's original Sysprep, XP2ESD already provides AutoSysprep in its modified XP installation.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. Gelip

    Gelip MDL Senior Member

    Feb 28, 2011
    325
    158
    10
    I'm sorry but not everyone, I'm only interested in universal - absolutely minimum number of files and scripts UEFI WinXP SP2 64-bit installer
    About 5 years ago, I was very interested in the topic on betaarchive.com - Does Windows XP have EFI? and I wanted to know what and how to do to run the system under UEFI. It was me who tested various loaders from different versions of Longhorn Beta and found 64-bit loader 16497
    I'm sorry but I want to know what is really needed to install WinXP 64-bit under UEFI from ISO/CD/DVD/USB Drive.

    I know all virtual machines very well - VMware Workstation, VMware ESXi, MS VPC 2007, Qemu on Windows without KVM, Virt Manager Qemu on Linux with KVM, I can mention the advantages and disadvantages.
    I don't like VirtualBox, I don't like how it works, It irritates me :annoyed::annoyed:
    I am impatient and I am still waiting for a test ISO that was supposed to be a long time ago - and for about month I only hear that "tomorrow, tomorrow":31:
    @George King
    You do a great job because someone (a beginner user) will start yours the UEFI installer and will not even know how it succeeded because everything will do automatically.

    I like to know what and how in detail - why it works or why it doesn't work - that's all :yes:

    Once again, I'm sorry that I delete scripts and files but thanks to this I have 670MB ISO and install the system in 3 minutes from a pendrive on NVMe disk - this is very, very satisfying :yeahyeah::wiggle::bananajoj2:
     
  20. UsefulAGKHelper

    UsefulAGKHelper MDL Senior Member

    Aug 28, 2021
    384
    237
    10
    #2820 UsefulAGKHelper, Dec 11, 2023
    Last edited: Dec 11, 2023
    @Gelip You don't have to use VirtualBox manually if you don't want to use it.

    In XP2ESD, VirtualBox is only used during the AutoSyprep stage (the stage of building XP's install.wim).

    The finished XP install.wim/install.esd from XP2ESD that was properly built with the help of VirtualBox also runs on VMware, Qemu and physical hardware without problems.
    In XP2ESD, it also supports using older version of VirtualBox in case of building in Xp host.

    I understand that you prefer to use the minimum amount of files to get this to work, feel free to do your topic if you want to.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...