@wimb
I tried the usb_prep3.cmd.
Changes observed as looking at source:
\usb_prep3\$OEM$\useraccounts.cmd
no more autologon
\usb_prep3\boot.ini
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="2. GUI Mode Setup Windows XP, Continue Setup + Start XP" /FASTDETECT
\usb_prep3\usb_prep3.cmd + some other changes for nLite
set xp_type=Home / Prof - RyanVM
\usb_prep3\undoren.cmd
\usb_prep3\ren_fold.cmd
take into account drive letter E F G H I J K L
Recommendation:
\usb_prep3\makeBS3.cmd: maybe to upgrade from
::<Release 0.03 ALPHA 05/August/2007
to jaclaz's latest version:
::<Release 0.07 ALPHA 01/October/2007
Now the script usb_prep3.cmd got some problems at execution.
CODE
Adding BTS DriverPacks if they were used ....
Lets copy everything to the USB drive, may take a while ( about 5 minutes )
Press a key to continue...
N:\txtsetup.sif
N:\NTLDR
Access denied
Add entry in BOOT.INI to launch TXT Mode Setup ....
A needed file is missing
File U:\setupldr.bin is missing
Press a key to continue...
missing file
1) Access denied
N: tempdrive
U: USB key
The acess denied is during copy from n:\ntldr to u:\ntldr which already exists in my key (I upgrade
the key by re-executing the script, so no new reformat on the key done). And u:\ntldr has read-only, hidden,
system attributes on it, hence problem.
2) A needed file is missing
ECHO Add entry in BOOT.INI to launch TXT Mode Setup ....
CALL makeBS3.cmd %usbdrive%\setupldr.bin /a "1. TXT Mode Setup Windows XP (Never unplug USB-stick) "
3)
File U:\setupldr.bin is missing
Error 2) and 3) are mysterious, but after some investigation I found out that my USB key does have a drive letter
but do not have a physical drive number (\\.\physicaldriveN in dsfo/dsfi notation). For example ptedit32 did not see the
disk (nor HDHacker of course, nor dsfo/dsfi/mbrfix). So probably MakeBS3.cmd failed due to this.
This situation arrives sometimes on my machine, apparently due to a lot usage of vdk/ImDisk, mount external USB HDD plug/unplug, QEMU, VMware etc...
I have to reboot to get a clean situation where plugging the key does create a new corresponding physical drive letter.
Other remarks:
1)
We probably need a kind of execution log (maybe simply by just capturing all usb_prep3.cmd output (stdout/stderr) with
"tee" (tee.exe under Win32), e.g. usb_prep3.cmd | tee usb_prep.log), so that by browsing the log problems can be spotted
easily (and for audit/history also). Without the log, some script (like MakeBS3.cmd uses cls command so the output is cleared
in the window command prompt, so even if I have a big screen buffer, I cannot use copy-paste to report/indicate needed messages output).
2) (optional) Maybe the script must check for errors (errolevel), mostly in copy/xcopy commands and stop execution on errors.
My mentioned errors above are fatal for me. With the log in point 1), this is less important. But I agree that user of this script
is a normally a technical person so he/she should be aware of those errors, and the script not being a GUI application cannot handle
all error situations.
3) Probably we need to ensure that all important files copied/modified (mostly in root: boot.ini, ntdetect.com, ntldr, setupldr.bin) could already exists with read-only,
hidden, system and hence to handle them correctly (reset all the attributes first).
4) Maybe offer the option to delete the temporary image tempimage.img (after the dialog to accept unmount the temporary drive).
Summary:
- I will re-experiment after reboot to get physical drive number associated with USB key
- I will temporarily reset ntldr read-only, hidden, system attribute on my key.
- I will re-experiment the script and report here.