Again showing GUI, show me how you list disk and partitions and related informations in console not in GUI.
Script displays disks and asks about the disk number on which to install: Spoiler Code: ... REM Make partitions, format & assign letters U: EFI 100MB FAT32 diskpart /s diskprep1.txt echo: set /p disk=Please enter the disk number (q to discard): if %disk%==q cmd /k set /p part=Please enter the size of the OS partition in MB (min. 2100): diskpart /s diskprep2.txt REM Search CD\DVD\USB drive letter and set in %drive% variable 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: REM Copy EFI folder from %drive%\sources to EFI partition xcopy %drive%\sources\EFI U:\EFI /e /h /c /i ... diskprep1.txt Spoiler Code: list disk diskprep2.txt Spoiler Code: sel disk %disk% clean convert gpt create par efi size=100 format fs=fat32 label="EFI" assign letter u create par pri size=%part% format fs=ntfs quick label="OS" assign letter c create par pri format fs=ntfs quick label="Data" I have a simple scenario - the user chooses the disk and the size of the partition on which WinXP wants to install. The WinXP or Win10 installer also displays a window with disks where you can choose a disk, partition or divide it again: I don't understand what you want to automate?
@Gelip Thats not automated solution. Manually you can do always anything. And handling EFI partition or bootloader is not issue. When is used winload thats different mapping story in BCD than boot.ini
OK, but I still do not understand what it needed for ??? What scenario do you assume? I understand only 2 scenarios: WinXP installation on one clean disk The user has a PC with factory-installed Win10 on the GPT disk - so there are ESP, MSR, OS and Recovery partitions To install XP, you must first separate the space on the disk If the partition with the Win10 (OS) system is not the last on the disk, it cannot be done in an easy way and you need to use specialized tools If the partition Win10 (OS) is last on the disk, you can easily reduce it with diskpart with shrink desired= command Now you can install WinXP in this separate area and then you do not need to create an ESP partition, only edit BCD on an existing ESP partition
+ scenario 3 : Replacing an existing partition. Similar to 2 plus delete partition / BCD entry option
Because I have no time to burn it with ListDisk development. I will use it for listing only for now to achieve needed result. Polishing with used tools can be done later as usual. DISKPART - Physical disk numbers are OK, partition numbers are logical - unusable for building boot.ini BOOTICE - Physical disk numbers are OK, partitions numbers starts from 0 instead of 1. Not sure if it's physical. Seems physical just started from 0 LISTDISK - Physical disk numbers are OK, partitions numbers are physical too - usable for building boot.ini Anyway my goal should be doable to cover all wanted scenarios now.
Pardon me so in new version you dont need to a clean install on a new disk but you can choose on wich partition install XP and of course make it bootable ?
That will be possible in future If you mean deploying from already installed system. For now it means we can get rid of needed partition number selection in POWIS. And also this means limit to be installed in first partition is gone. Now it should be on any disk and any partition.
@George King I'm trying to use ListDisk to find the EFI partition but I am not doing something: Spoiler Code: @ECHO OFF REM Find the USB drive on which the needed files are for %%a 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 "%%a:\listdisk.exe" set drive=%%a: %drive%\listdisk for /f "tokens=6 delims= " %%p in ('echo listdisk ^| find "EFI System"') do set efi=%%p echo: echo EFI partition is %efi% echo: pause P.S. Please fix ListDisk because data still not fit in WinPE window e.g. change Partition to Par or/and remove character | from table as diskpart displays:
@Gelip Just change default console settings width do 95. Table view is there for a reason to be able to parse output in scripts easily.
Unnecessary additional clicks It is not easier at all - diskpart displays the data very nicely without any characters and it is easier to search e.g. for /f "tokens= delims=
No need to fight with the incredibly dumb pre W10 consolle ConEmu is a must have (also in W10 W11) You get normal copy and paste (via CTRL+C/CTRL+V), tabs, dynamically resizable consolle, a ton of personalizations, and another huge list of features Optionally (but strongly suggested) you can also install the tiny Clink, and you get also the Bash like persistent history (invaluable IMO) AFAIR the last ConEmu version Working in Windows 5.1/5.2 is 180626, the last Clink working is 0.4.8 @George King I tested listdisk on a stock Server 2003R2 it complains about missing msvcp140.dll (so VC 2015 I guess, which isn't officially supported in XP/2003). I ask myself, given it's aimed mainly to XP and is compiled from scratch, is 2015 really needed, wouldn't better to compile it with an older VC and make it working even on a freshly installed XP (plus a supported VC runtime)?
@acer-5100 Yes, You need latest Visual C++ repack installed for listdisk. Yes, I this case I have downloaded Visual Studio 2010 Professional + SP1 + All updates from catalog. I would like to try it in future. But I quess there will be code compatibility issues.
@George King Your tool not mount EFI partition: Code: | Disk 1 | Partition 1 | GPT | 100.00 MB | EFI System | FAT32 | | EFI | | Disk 1 | Partition 2 | GPT | 10.00 GB | Basic Data | NTFS | G: | OS | | Disk 1 | Partition 3 | GPT | 29.90 GB | Basic Data | NTFS | Z: | Data | EFI partition on disk 1 is 1 Volume not found for Disk 1, Partition 1 Failed to mount Disk 1, Partition 1 Press any key to continue . . . Code: @ECHO OFF REM Find the USB drive on which the needed files are for %%a 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 "%%a:\listdisk.exe" set drive=%%a: %drive%\listdisk for /f "tokens=3 delims= " %%p in ('%drive%\listdisk ^| find "EFI System"') do set disk=%%p for /f "tokens=6 delims= " %%p in ('%drive%\listdisk ^| find "EFI System"') do set par=%%p echo: echo EFI partition on disk %disk% is %par% echo: %drive%\listdisk /mount %disk% %par% U pause