Installing Windows XP\7\8\10 using WinNTSetup
If you wish, you can use WinNTSetup to install Windows directly from a Windows Install ISO file. For instance, you can MBR-boot from a Windows 10 32-bit ISO and then use WinNTSetup to install Windows 7 x64 from an ISO, onto a GPT partition and install Win7 x64 in UEFI mode.
Install Windows 7 onto modern systems
This process allows you to install Windows 7 onto a system that only has USB 3 ports/controllers because we boot to Windows 10 PE first which includes USB 3 drivers and so Setup can access the USB 3 ports.
New! E2B eBooks are now available (including a complete course on making a multiboot USB drive and an eBook on Installing Windows). This method is very flexible, but does require some degree of ‘expert’ knowledge.
- There is no need to UEFI-boot from the E2B USB drive
- Works from both Removable and Fixed-disk E2B drives
- Allows you to install XP or Win7 from a USB 3.0 port and to a SATA\RAID drive (see below)
- Supports MBR and GPT installs
- No modification of ISOs or boot.wim required
- No .imgPTN file required
- No WinHelper USB Flash drive required
- You can use SDI_CHOCO or other XML files (XML files can be generated on WAFG website)
- Can choose any partitioning scheme without needing to change the XML file
- Can be fully automated
- Can load different configuration files
- You will need to wipe and partition and format the target disk (e.g. can easily use a diskpart script from within WinNTSetup)
- Potential to wipe the wrong disk!
- WinNTSetup is used (see screenshot below)…
Tip: All three ‘traffic lights’ should be green. The BOOT PART in red means that the partition is not marked active (bootable) and it should be!
Example – Windows 7 install on modern USB 3 systems
You can install Windows 7 (or any OS) onto modern systems using this technique.
Method 1 (for 64-bit CPU systems with internet access)
1. Download Hirens HBCD PE ISO x64
2. Copy the ISO file to \_ISO\WINPE folder and rename extension to .isomap64
3. Copy your Win7 ISO to anywhere on the E2B drive – e.g. \_ISO\WINDOWS\WIN7
4. Boot to HBCD PE ISO (MBR or UEFI)
5. Utilities – Hard Disk Tools – Partition Tools – AOMEI Partition Assistant (partition target disk)
6. Utilities – System Tools – Windows Setup – WinNSetup.exe (install Win7 – see below)
Method 2 (using Win10 ISO)
1. You will need to copy a Windows 10 ISO file and the Windows 7 install ISO on the E2B USB drive.
\_ISO\WINDOWS\WIN10\Windows 10 x64.iso (we will only boot to this ISO)
\_ISO\WINDOWS\WIN7\Windows 7 x64.iso (we will install this ISO)
2. Download WinNTSetup as described below.
3. Boot to the Windows 10 ISO (you can MBR\Legacy boot or UEFI boot using agFM)
4. Press SHIFT+F10 to open a command console and run WinNTSetup_x64.exe (or WinNTSetup_x86.exe if you booted from a 32-bit Windows 10 ISO).
5. In WinNTSetup – press SHIFT+CTRL+D – select the desired partition script for the correct disk (usually disk 0)
Tip: if you prefer, you can run MiniTool Portable Partition Magic (partitionwizard.exe – registered versions only) to partition the target drive (copy the folder to the USB drive first).
6. Select the Windows 7 ISO file and specify the Boot and System partitions (e.g. both = W:)
Check you have three green traffic lights…
7. Select the Edition you want to install and click on Setup, then proceed with the install.
8. Remove the USB drive and allow the system to reboot from the hard disk to complete the Windows 7 installation.
1. Download WinNTSetup v3.9.3 or a later version (do not use an earlier version) and extract all the files to the folder on the E2B USB drive at \_ISO\docs\E2B Utilities\WinNTSetup. This folder already exists on the E2B drive and contains additional useful files.
Tip: Use Right-click – Properties – UnBlock to remove the Windows security warning that you get when WinNTSetup is first run.
2. (optional) Download BootIce (x86 and x64 versions) for use as a partitioning tool and copy them both to the WinNTSetup folder.
3. We need to first download some additional files. Run WinNTSetup.exe under Windows from the E2B drive. Say ‘Yes’ to allow it to download some needed files.
Now Quit WinNTSetup.
4. Make sure your E2B drive contains the ISO that you want to install (can be anywhere on the E2B USB disk) – e.g. Windows_10_x64_Home_Pro.iso or Windows 7 x64.iso.
Note: You can use e.g. Win10x64x86October_.WinNTSetup.iso to automatically run WinNTSetup when WinPE loads.
5. (optional) Add a diskpart script .txt file (some are already present in E2B). Make a text file containing the diskpart commands which you can use to wipe and partition the target hard disk. See here for some GPT examples and here for some MBR examples. Here is one I used to partition Disk 0 as a GPT disk ready for a UEFI install…
select disk 0 clean convert gpt create partition primary size=300 format quick fs=ntfs label="Windows RE tools" assign letter="T" create partition efi size=100 rem == Note: for Advanced Format Generation One drives, change to size=260. format quick fs=fat32 label="System" assign letter="S" create partition msr size=128 create partition primary format quick fs=ntfs label="Windows" assign letter="W" exit
If you have WinNTSetup v3.9.3 or later, the \WinNTSetup\tools\diskpart folder will already contain some sample diskpart scripts.
E2B also contains some additional sample diskpart script files..
- Disk0_uefi_300MBWinRETools_100MBEFI_128MBMSR_Win_15GBRecov.txt (GPT)
Note that the Disk1_xxxx files will erase the second disk (as seen by Windows) in your system. If you only have one disk in the system, the Disk1_xxxx files will erase the E2B USB drive! I use the Disk1_xxxx files when booting from an E2B USB drive under VirtualBox+VMUB. Under VBox+VMUB, Disk 0 is the USB drive and Disk 1 is the Virtual Machine Hard disk, so I must use the Disk1_xxxx files under Virtual Box.
Note: WinNTSetup v3.9.3 and later
If the file .\Tools\Diskpart\enabled=1 exists, this will enable the CTRL+SHIFT+D diskpart feature in WinNTSetup.exe when it is run.
Tip: To make it easier to find WinNTSetup later, copy the whole \_ISO\docs\E2B Utilities\WinNTSetup folder to \WinNTSetup.
Tip2: Simply rename the Windows 10 ISO with a _.WinNTSetup.iso filename, e.g.
1. Name the ISO file \_ISO\MAINMENU\Windows_10_x64_.WinNTSetup.iso
2. Now boot to E2B and select the menu entry.
This will automatically load the ISO into WinNTSetup for you. You can select a different ISO (e.g. a Win7 ISO) if you wish.
3. Now go to Step 3 below (but skip Step 4)…
See blog post for more details.
Boot to WinPE and run WinNTSetup
1. Boot to the E2B Main menu and select and MBR-boot from a Windows ISO (see below for UEFI-booting).
This can be the same ISO that you are going to install from or a different one (I suggest using the latest Win10 ISO because it is likely to contain the latest drivers). You can use any of the ISOs in the \_ISO\WINDOWS\xxx folders or just copy a Windows Install ISO to any one of the other ‘standard’ menu folders (e.g. \_ISO\MAINMENU). You can boot to almost any WinPE 8 or 10 ISO (e.g. ChrisR’s WinPESE ISOs, DLC ISOs, Gandalf ISOs, etc.). It can be a 32-bit or 64-bit ISO. Do NOT boot from a Windows 7 ISO because it won’t have modern chipset or USB 3 support!
2. When you reach the first Windows ‘Setup’ screen, press SHIFT+F10 to get to the command shell.
If SHIFT+F10 does not work, proceed to the next Setup screen and try it again.
All versions of E2B…
3. Create Partitions
At the Windows command shell, we need to wipe and partition the target hard disk.
Tip: Run WinNTSetup.exe and then press Use CTRL+SHIFT+D (see above) to automatically run a pre-existent diskpart script to wipe and partition the drive – make sure you select the right one or it may wipe a different drive or your E2B drive!. You can then skip step 3.
Note: Under WinPE, Ctrl-Shift+D may not work unless you use v3.9.1 or later.
You can run a Windows DiskPart script. e.g. where D: is the E2B USB drive…
diskpart /s d:\WinNTSetup\tools\diskpart\DiskPartGPT.scr
Or, if you prefer, you can create the partitions using diskpart by typing in the commands manually and use abbreviated commands (mostly three-letter abbreviations can be used) – .e.g. type cre instead of create :
sel dis 0
cre par pri size=300
for quick fs=ntfs label="Windows RE tools"
assign letter T
cre par efi size=100
for quick fs=fat32 label="System"
assign letter S
cre par msr size=128
cre par pri
for quick fs=ntfs label="Windows"
assign letter W
Note: Later versions of WinNTSetup (3.9.0+) allow you to press CTRL+SHIFT+D and pick a diskpart script file.
The file .\Tools\Diskpart\enabled=1 must be present for CTRL+SHIFT+D to work. This file is already present in E2B.
You can use the ‘F’ buttons in WinNTSetup to format any existing volumes. Make sure that you format the System EFI partition as FAT32.
Press F1 in WinNTSetup for help.
Example manual diskpart commands for single maximum size partition:
sel dis 0
cre par pri
for quick fs=ntfs label="Windows"
assign letter C
Note that a ‘convert mbr’ or ‘convert gpt’ command is required to ensure that Windows does not fail during installation of boot files, due to any previously-used partitioning scheme.
If you prefer, you could run a different partitioning tool to prepare the target hard disk first, instead of using diskpart (e.g. boot from a EaseUS Partition Master ISO or use BootIce).
4. Now run WinNTSetup (either the 32-bit WinNTSetup_x86.exe or 64-bit WinNTSetup_x64.exe version) and select your ISO file (you must use v.3.9.1 or later).
Tip: To install from an XP ISO file right-click on the ‘Search’ button or CD+box icon to load the ISO as a virtual drive. If WinNTSetup cannot find the install.wim\install.esd file, you may need to use the Search button to find the Virtual CD mounted by WinNTSetup (made after selecting the ISO file) and then select the Install.esd\Install.wim file manually from the virtual CD drive (e.g. M:\sources\install.esd).
Ensure that WinNTSetup finds the install.wim\esd\swm file (see first arrow in screenshot below).
Check that the three ‘trafiic lights’ are all green. If not, the partitions are not correctly formatted. Press F1 in WinNTSetup for help.
5. Select the Boot (System) volume – in my case S:
6. Select the ‘Installation’ (OS) volume – in my case W:
7. (optional) Select an XML file – tick the ‘Unattend‘ button.
Tip: right-click the on the check-box to edit the XML file.
In my case I selected one of the ZZDanger_xxxxxx_SDI_CHOCO.XML files. Note that if the XML file contains a drive partition section, it will be ignored, so the partitions will remain unchanged.
Note: the version of Windows that is installed is determined by the one that you select in WinNTSetup and NOT the XML file.
There are other options available in WinNTSetup, such as creating VHD files so that you can install to a VHD, and adding ‘Tweaks’ and your own drivers.
8. Select the Windows Edition in WinNTSetup, e.g. Professional (N.B. The settings in the XML file will be ignored, so you must select the correct Edition).
9. Click the Setup button – you can change a few options here if you wish (not normally required) – to support both UEFI and MBR booting, make sure the ALL option is displayed. You can tick the Restart option if you wish and it will automatically reboot afterwards.
10. Click the OK button and WinNTSetup will copy the files across to your target volumes and make it bootable.
Once the copy phase has completed, reboot and make sure you configure the target system’s firmware to boot in either MBR or UEFI mode, as desired.
If running an SDI_CHOCO.XML unattend file, I suggest you remove the E2B USB drive once SDI_CHOCO tells you to. Otherwise you may find that the target system will try to reboot from the E2B drive.
If you are not using SDI_CHOCO, then you can disconnect the E2B USB drive before you allow the target system to boot.
Direct Boot and auto-run WinNTSetup (E2B v1.A9+)
If you name the end of the ISO filename as _.WinNTSetup.iso (not case sensitive) then E2B will boot from the ISO, then run WinNTSetup from the E2B drive and then automatically load the ISO as the source file. If you place the ISO in one of the \_ISO\WINDOWS\xxxxxx folders, when you are prompted to ‘Press enter only if you want to repair’ and you press ENTER, then it will run WinNTSetup instead of the normal Setup.exe process.
Tip: Use Ctrl+S to save a configuration file after you have set up all the options. Then use Ctrl+L to load the same configuration file for the next time!
Tip: Use Ctrl+Shift+D to run a diskpart script to quickly partition and format a drive.
Use the grub4dos STARTUP variable to run any WinNTSetup command line
By default, the E2B WinNTSetup process cause the \_ISO\e2b\grub\start_WinNTSetup.bat file to run once it boots to WinPE. If you want to run a specific WinNTSetup command line then you can use the STARTUP variable in a .mnu file to specify a different batch file which you can modify however you wish. In this way, for example, you can run WinNTSetup and specify in the batch file an XML file, Edition (Pro, Home, etc.) and any other parameters you want. See \_ISO\docs\Sample mnu Files\Windows\WinNTSetup.mnu for an example file and copy it to an E2B menu folder.
#Copy the \_ISO\e2b\grub\start_WinNTSetup.bat to your \_ISO\docs\E2B Utilities\WinNTSetup folder on the E2B drive (or \WinNTSetup folder)
title WinNTSetup test\nBoot to Windows 10 and run WinNTSetup
# Note use forward slash instead of \ and escape (precede) spaces using \
set STARTUP=/_ISO/docs/E2B\ Utilities/WinNTSetup/test_WinNT.bat
#we need to use the force.WinNTSetup keyword if the name of the ISO does not end in _.WinNTSetup.iso...
QRUN.g4b force.WinNTSetup /_ISO/MAINMENU/Windows10_2018_08_03_UK_Both.iso
e.g. test_WinNT.bat can be edited to run an XML and specify the ISO and Edition you want to install using, for example:
“%wpath%\WinNTSetup%pp%.exe” NT6 -source:”%MYISO%” -wimindex:”2″ -unattend:”Win10UK_with_SDI_CHOCO.xml”
or this line which also specifies configuration file and the boot and system volumes:
“%wpath%\WinNTSetup%pp%.exe” NT6 -source:”%MYISO%” -wimindex:”5″ -cfg:”WinNTSpecial.ini” -sysPart:D: -tempDrive:D:
Note that you (or your script) must clean, partition and format the target drive. Also you (or the command line parameters) must specify which Edition (wim index number) you want to install – it is not controlled by the XML file. Precede the command line with set MYISO=%E2BDRIVE%\_ISO\WINDOWS\WIN7\Win7x64.iso if you want to specify a different ISO. When in WinNTSetup.exe, you can set up any tweaks, settings, etc. and the press Ctrl+S to save them into an .ini file. You can then specify that .ini file as a parameter for WinNTSetup to load. See blog post here.
Install Windows 7 onto a system with USB 3 ports (E2B v1.B0+)
The Sample menu file at “\_ISO\docs\Sample mnu files\Windows\Install Windows 7 with USB 3 (WinNTSetup).mnu” can be used to boot from a Win10 Install ISO and install Windows 7.
Copy the file to an E2B menu folder and modify it as required.
#Use this menu to boot from a Win10 or Win8 Install ISO (or WinPE ISO) and load a different ISO - e.g. Win7 ISO
title Install Windows 7 (WinNTSetup+Windows 10)\nBoot to Windows 10 and run WinNTSetup\nwith Windows 7 ISO as the source.\nUseful if the system has USB 3 ports
# Paths: use forward slash instead of \ and escape (precede) spaces using \
# Specify boot ISOset ISO=/_ISO/WINDOWS/WIN10/Windows10x64UK_Oct_2018.iso
# Specify alternate Source ISO to load into WinNTSetup
# Specify alternate batch file to run
#set STARTUP=/_ISO/docs/E2B\ Utilities/WinNTSetup/test_WinNT.bat
#we need to use the force.WinNTSetup keyword if the name of the ISO does not end in _.WinNTSetup.iso...
QRUN.g4b force.WinNTSetup %ISO%
You can MBR-boot and install a UEFI+GPT version of Windows to a target hard disk, however some systems cannot MBR-boot, they can only UEFI-boot.
If you use Easy2Boot v2 with agFM UEFI files, you can directly UEFI-boot from a Windows ISO.
Another alternative is to create a .imgPTN file…
You will need to create a FAT32 WinPE .imgPTN file using the MPI Tool Pack v0.070 or later. This version includes \e2b\RestoreE2B_32_64.cmd which will work under 64-bit WinPE as well as 32-bit WinPE without needing WoW64. You can use any UEFI-bootable source for the WinPE – e.g. Windows 10 Install ISO (the \sources\install.wim file can be removed). If the \sources\install.wim or install.esd file is greater than 4GB, instead of running MakePartImage, run Split_WinISO.exe (in the MPI folder) to split the file.
- When you have created the .imgPTN file, switch to it using \_ISO\SWITCH_E2B.exe (a 32-bit executable).
- Now UEFI-boot from the E2B USB drive on the target UEFI system.
- Once it has booted to WinPE, run \e2b\RestoreE2B_32_64.cmd and answer Y when prompted to switch in the E2B partitions (note: does not work in XP WinPE so try other .cmd scripts if XP PE).
- You can now access the \WinNTSetup folder, the Windows Install .ISO files and the .XML files that are on the E2B partition.
- Run WinNTSetup and proceed as outlined above.
Tip: if you prefer, you can place the \WinNTSetup folder and all the ISOs on the 2nd partition of the E2B drive and use a .imgPTN23 file extension so that the 2nd partition can be accessed.
Install XP to a SATA\RAID HDD from a USB 2.0 or 3.0 port
It is tricky, but you can install XP to a SATA\RAID hard disk and boot from a USB 3.0 port.
This allows you to install XP to a system that has a SATA hard disk, even if it has only USB 3.0 ports.
You will need an XP ISO (e.g. XPSP3) and a Windows 8, 8.1, 10 Installation ISO (or any Win8/10 WinPE ISO)
- Copy the WinNTSetup_DPMS_Step2.mnu from the \_ISO\docs\Sample mnu Files\Windows folder to \_ISO\MAINMENU or \_ISO\WINPE, and then edit the XPISO entry to match your ISO in the \_ISO\WINDOWS\XP folder.
- Copy WinNTSetup files to the E2B drive (e.g. \_ISO\docs\E2B Utilities\WinNTSetup\ – see above).
- Boot using E2B to a Windows 8.1 or Windows 10 Installation ISO to run WinPE (or use any WinPE ISO)
- At first screen, press SHIFT+F10 and run WinNTSetup.exe (either x86 or x64 version) from the E2B USB drive – then select the Windows 2000\XP\2003 tab.
- Format the target HDD (e.g. using diskpart) and select correct XP ISO file from the \_ISO\WINDOWS\XP folder – select target volumes (e.g. W: and W: if one partition) and click START.
- Reboot back to E2B drive and run the ‘Use after WinNTSetup to add SATA\RAID drivers‘ menu entry. It will pick the correct DPMS SATA driver for XP. In my tests, I had to press ESC 9 times to skip past the firadisk driver files not loading (not sure why this happens!).
- Allow to reboot from HDD to finish installation (or press F7 if it boots back to E2B).
Note: You can use CTRL+SHIFT+D to run a diskpart script in WinNTSetup, however make sure that the script file creates partitions suitable for XP.
Here is a simple diskpart script for a single, maximum-sized NTFS partition.
select disk 0
create partition primary
format quick fs=ntfs label="Windows"
It is possible to script WinNTSetup.exe. You could create a .cmd file which runs a diskpart script and then runs WinNTSetup.exe, e.g. where U: is the E2B drive which contains the install.wim and some drivers (untested)…
REM partition disk using a diskpart script diskpart /s U:\Win7\Win7.scr REM Install Windows7 Ultimate (usually Wimindex 5) to drive C:, using unattend.xml file and define driver to integrate. REM Use C: as driveletter for the new Win installation, run set_7_usb_boot.cmd before rebooting U:\WinNTSetup\WinNTSetup_x86.exe NT6 -source:U:\sources\install.wim -WimIndex:5 -syspart:C: -tempdrive:C: -unattend:"unattend\Win7x86_Ultimate_en.xml"-ForceUnsigned -drivers:"U:\driver_Win7x86" -Sysletter:C -RunAfter:"set_7_usb_boot.cmd C:\windows" -setup -reboot
Tip: If you use Split_WInISO.exe to create a .imgPTN file from a Win10 install ISO, it will add the winpeshl.ini files into the boot.wim for you. When you boot to WinPE using the .imgPTN file (MBR or UEFI), it will automatically run \auto.cmd. So you can edit \auto.cmd to create a menu and use it to select any one of a range of .cmd script files.