Tutorial #3 described a way in which you could install XP from a USB drive by booting from a USB drive to WinPE (version 2 or 3) and copying the i386 files from the USB drive to the hard disk.
This Tutorial describes how you can have many different XP ISO files on one USB drive. This is a ONE-STEP process - only a single boot is required from the USB drive. You can automate an install by booting from the USB drive and just walk away and leave it to finish installing XP (if you remove all user prompts). This Tutorial also allows you to add driver files and applications to the target hard disk. If you have INF-based driver files, these will be automatically installed. You can use each XP ISO file in many different ways, for instance using the same XP ISO file, you can:
You can also easily modify the process without needing to edit the XP ISO files. By adding another variable for a copy folder such as set CF=Dell530 and adding the drivers and applications for the Dell 530 to a Dell530 folder on the USB drive, the process will copy over those files too. This means that you could have one ISO on a USB hard disk, but multiple menu items such as:
and have the drivers for each model on the USB drive under \ImDisk\COPYFOLDER\Dell530, \ImDisk\COPYFOLDER\904HA, etc. (avoid spaces in the folder names or it may cause problems!). To ensure that the drivers are installed when XP boots, the unattend.txt answer file should contain an OEMPnPDriversPath = "Drv\Net;Drv\Audio;Drv\monitor;Drv\Storage;Drv\Video;Drv\Mbd;Drv\Modem;Drv\Misc" line or similar. The folder structure on the USB boot disk for the Dell530 would then look like this:
each folder should contain the INF files and driver files. $1 is the root of the hard disk, so this will make folders at C:\Drv\Net, C:\Drv\Monitor, etc. The INF files must be present in the exact folders named in the answer file (and not in subdirectories or differently named folders under DRV!). You can add more folders to the unattend.txt line, but beware, there is a 255 character limit to the answer file line length, so keep the folder paths short - or use drv\1;drv\2;drv\3 etc. if you want a lot of driver folders to be searched automatically by XP! If you need to run a script when XP boots (for instance to silently install drivers or add software), you can add this entry to your answer file and it will run as soon as XP reaches the Desktop when the install completes - e.g.
This will cause the file c:\shortcut.bat to run (which you must provide), and you can then run any other batch files, install setup.exe drivers silently, install software, etc.
If you use shortcut.bat to add another batch file into the C:\Documents and Settings\All Users\Start Menu\Programs\Startup folder, you can ensure that any reboot will re-run that batch file again so you can continue the automated install. Note: You cannot simply create an \ImDisk\COPYFOLDER\Dell530\$OEM$\$1\Documents and Settings\All Users folder because Windows will create an All Users.Windows folder instead of an All Users folder when it installs! SummaryThis how you would use the USB drive to install XP to an internal hard drive:
For each ISO you can specify a different diskpart partition script and an unattend.txt/winnt.sif answer file.
You can omit one or both of these for a semi-automated or entirely manual install of XP.
Method1. Prepare a WinPE v3 bootable OS by installing the MS WAIK as follows:
2. Modify the WinPE boot.wim using DISM to mount the boot.wim2.1 On the 'office' system, launch the WAIK command shell (right-click - run as administrator) window using the Start Menu. Close all other cmd and Explorer windows. Note: You can convert the WinPE OS files to a .ISO file using oscdimg - at the WAIK command type this command line:
By using WinPE in an ISO file, you can have a multi-boot USB drive that does not need the WinPE boot files in folders on the USB drive itself.
3. Make a grub4dos bootable USB drive
Example menu.lst file #DP=diskpart #ANS=answer file - unattend.txt #CF=Config folder
For an attended install or if your ISO already contains an unattended.txt file, simply set ANSWER= (make sure the are no spaces at the end of the line).
If your ISO contains an unattend.txt file for an unattended install but you want to have an attended (manual) install, then specify an empty answer file (e.g. ANS=empty.txt).
You can choose a diskpart script from the ones in the \ImDisk\diskpart folder or make new ones of your own.
Note that the drive that you want to install the OS onto must be assigned a drive letter of T: by the diskpart script.
You can fully automate the process (dangerous!) by editing \ImDisk\LOADISO.cmd and \ImDisk\RunWinnt.cmd and remove any 'Pause' commands. If you convert WinPE into an ISO (see Step 2), you do not need the WinPE boot files on the USB boot disk, just the ISO file and then modify each menu as below:
Adding Mass Storage Drivers (e.g. AHCI)See here (Step 3 - section 2) for more help on the file structure and answer file settings required. The AHCI/RAID drivers need to be added to TWO folders in your copyfolder structure... You need to modify your answer file (e.g. unattend.txt) and include the txtsetup.oem and AHCI/RAID drivers in the \ImDisk\COPYFOLDER\Dell530\$oem$\textmode folder as well as ensure the AHCI\RAID drivers are present in one of the OEMPnPDriversPath folders specified in the unattend.txt file (e.g. \ImDisk\COPYFOLDER\Dell530\$oem$\$1\drv\storage). Tip: If you have any problems, try omitting any = "Retail" entries and use just = "OEM" entries. Note that an unattend.txt file for an AHCI system will not also work on an IDE system. If any problems, boot to an OS (e.g. WinPE) from a USB stick or DVDROM and check the XP Setup log files: XP creates the following log files:setupact.log -This log file contains a list of actions in chronological order that occurred during the graphical installation phase, such as file copies and registry changes. The OS also stores setup error log entries in this file. XP writes the setupact.log file to the %systemroot% folder (e.g., c:\windows). setupapi.log -XP writes information to the setupapi.log file each time a .inf file executes, including any errors. XP writes the setupapi.log file to the %systemroot% folder. setuperr.log -This log file contains a list of errors that occurred during installation and their severity (this log file should be 0 bytes in size if no errors occurred during installation). XP writes the setuperr.log file to the %systemroot% folder. comsetup.log -This log file contains installation information about Optional Component Manager and COM+ components. XP writes the comsetup.log file to the %systemroot% folder. netsetup.log -This log file contains information about workgroup and domain membership. XP writes the netsetup.log file to the \%systemroot%\debug folder. setup.log -The Recovery Console (RC) uses the setup.log file to gain information about the Windows installation during repair operations. XP writes the setup.log file to the \%systemroot%\repair folder. |
