You can choose from several different XP installations by placing each i386 XP CD source folder into a separate folder on the USB drive and installing the one that you want onto the target hard drive.
- Create a bootable WinPE USB drive
- Copy any Microsoft Windows XP CD (or XP ISO contents) to a folder on the USB drive
- Boot using the USB drive on the target system and wipe, partition and format the hard disk
- Copy the XP (32-bit version) files to the hard disk from the USB drive
- Run winnt32.exe (the file will be on the hard disk after copying from the USB drive)
- Reboot and allow XP Setup to continue
1. Download and install the Windows 7 WAIK to obtain the ImageX utility and WinPE files
For instructions on how to do this, please refer to the first part of my tutorial hereor follow the Make_PE3 tutorial.
Follow the instruction up to the point where a WinPE folder has been created (Step 1)
You can create either an x86 version (recommended) or an amd64 (64-bit) version.
Create a new folder C:MYXP on your office computer.
Copy the c:pe86ISO folder contents to C:MYXP (C:MYXP should now contain bootmgr, folders boot, sources, efi, etc.)
2. Obtain a Microsoft Windows XP installation CD or ISO or set of NLited files that you wish to install
Create a new folder on your Windows (office computer) hard disk called C:MYXPXPPROi386 (assuming you have XP Professional)
Copy all the files in the CD's i386 folder to C:MYXPXPPROi386 folder
Ensure that the file C:MYXPXPPROi386unattend.txt is present and has been correctly modified by you (see end of this page for an example)
Note: XP does not contain AHCI or some SCSI/SATA drivers - either you must set your BIOS menu for Hard Disk mode to 'compatible/legacy' hard disk mode or you must use a specially modified version of XP (e.g. use nLite).
Now prepare a WinPE v3 (bootmgr) bootable USB drive using RMPrepUSB and copy over the C:MYXP folder to the USB drive - please refer to the part 2 of my tutorial here. Note: NTFS formatting is recommended for speed.
The USB drive should now contain an XPPRO folder as well as the winpe folders: sources, boot, etc.
3. Boot from the WinPE USB drive using the target system that you wish to install Windows XP onto.
Now run DISKPART and type the following commands (assuming you want a two partitions on the hard disk) - only type the commands in red:
LIS DISlists the disks present
SEL DIS 0select disk zero (usually the first hard disk)
CRE PAR PRI SIZE=30000 ALIGN=16065create a 30GB primary partition for XP (change as required) - if this gives an error use 64260 instead of 16065.
FOR QUICK LABEL=SYSTEMformat it as NTFS (add FS=FAT32 if you don't want an NTFS partition)
ACTmake it the boot partition
CRE PAR PRIcreate another NTFS partition of remaining size (optional)
ASSIGNassign it a drive letter (optional)
EXITquit diskpart
you now should have a formatted hard disk ready to receive files.
5. Now you need to run winnt32.exe from the drive containing the source i386 folder (e.g. if D: is the USB drive) to start the copy of the XP install files to the hard disk as follows:
(thanks to João Santos for the tip of adding /makelocalsource!).
To install a different XP source - e.g. D:XPHOMEi386 or D:XPPROi386 just change the winnt32.exe path accordingly.
5. When the setup phase completes and returns you to the command line you can reboot by typing:
Now remove the USB drive and allow the target PC to boot and start the textmode 1st setup phase. Note that unless you have added AHCI drivers (or press F6), the BIOS must be set to IDE (compatible) mode or you will get the dreaded BSOD 0x0000007b error!
TIP: The XP files are many and the file copy is thus quite slow (and very slow if using FAT32 on the UFD). You can speed this up by using 7zip instead of a file copy. Just zip up the XPPRO folder and place the zip file on your USB drive instead of the XP I386 files, then extract the files to the hard disk using the 7zip e or x option. You can also extract a zip file from a network as pulling a zip file across a network is a lot less data than pulling over all of the i386 files and therefore much faster! Remove the /makelocalsource switch if you do this.
Tip: You can easily automate the steps from 3 to 6 - e.g.
diskpart /s dp.scr
J:
winnt32 /unattend10:J:i386unattend.txt /syspart:J: /tempdrive:J: /s:J:i386 /noreboot
wpeutil reboot
where the file dp.scr contains the diskpart commands in step 3 (except for the first DISKPART line, of course).
WinPE has networking
The i386 files do not need to be on your USB drive, they can be on any networked computer. Just create a shared folder on your 'office' PC (or server) - right-click on the C:MYXP folder and choose 'share with' to share it out.
The WinPE USB drive will need to have the correct network drive for the target system.
To install the correct network driver when you have booted to WinPE from your USB pen, type DRVLOAD F:WIN7DRIVxxxxx.inf where the USB drive folder F:WIN7DRV contains the correct win7 driver files (.inf, .sys, .dll, .cat etc.) for your hardware (wait a minute or so afterwards for networking to start up). Now connect to your networked shared folder on your office PC using the command:
NET USE N: mypcMYXP U:myworkgroupmyloginname [Enter]
Now dir N: should list the contents of the MYXP folder on your office computer. So you can now install any XP image across the network and you don't need the XP files on the USB drive at all, just change the XCOPY source folder in the example above to point to your N: network folder.
Another tip is to back up the XP install once it has finished installation. Then you can easily and quickly restore your XP install at any time in the future - see Tutorial #1 for details!
SAMPLE UNATTEND.TXT FILE FOR UK
[Data]
MsDosInitiated='0'
UnattendSwitch=Yes
UnattendMode=FullUnattended
OemPreinstall=Yes
;Driver INF files placed in the following folders will be automatically installed
OEMPnPDriversPath = 'DrvNet;DrvAudio;Drvmonitor;DrvStorage;DrvVideo;DrvMbd;DrvModem;DrvMisc'
[UserData]
OrgName= 'Ted plc'
;put your product key on the next line or delete the next line
AdminPassword=*
TimeZone=85
AutoLogon=Yes
CountryCode=44
[RegionalSettings]
Language=00000809
[Display]
XResolution = 800
VRefresh = 70
[Identification]
InstallDefaultComponents=Yes
[GuiRunOnce]
[Branding]
IEBrandingFile = install.ins