Diskpart in Windows 2003 R2/Vista/7 have a magic function
1. For LiveXP include in you project this script Virtual Disk Services( required by Diskpart, download here,
use as source win2003R2 ), and USB Mass Storage Dummy Filter Driver. Build you Project, Boot in Live2003(liveXP)
you can use WinPE Vista/7, or Win7PE SE
2. run ->Diskpart
3. important! verify if you drive is recognized by diskpart as disk (For UFD)
DISKPART> list disk Disk ### Status Size Free Dyn Gpt -------- ---------- ------- ------- --- --- Disk 0 Online 12 GB 0 B Disk 1 Online 8189 MB 0 B Disk 2 Online 973 MB 0 B <- this is my UFD 4. DISKPART> list vol Volume ### Ltr Label Fs Type Size Status Info ---------- --- ----------- ----- ---------- ------- --------- -------- Volume 0 D new HDD NTFS Partition 5193 MB Healthy Volume 1 F RAW Partition 2996 MB Healthy Volume 2 X LiveXP CDFS CD-ROM 183 MB Healthy Boot Volume 3 C system NTFS Partition 10 GB Healthy Volume 4 E NTFS Partition 2283 MB Healthy Volume 5 H USBREADONLY FAT32 Partition 973 MB Healthy <- this is volume on my UFD 5. DISKPART> select vol 5 Volume 5 is the selected volume. 6. DISKPART> att vol set readonly Volume attributes set successfully. Note: For master boot record (MBR) basic disks, the attribute bits are applied or changed disk-wide and affect all volumes on the disk. 7.Verify readonly attribute DISKPART> detail volume Disk ### Status Size Free Dyn Gpt -------- ---------- ------- ------- --- --- * Disk 2 Online 973 MB 0 B Readonly : Yes Hidden : Yes No Default Drive Letter: No Shadow Copy : No
write potected work with file system FAT, FAT32, NTFS,
exFAT not tested
After set readonly atribute File System Work like program Shadow Defender, you can copy files to you protected drive, but after first reboot all files deleted!
Clear write-protection
Diskpart> att vol clear readonly
Screenshot
about Diskpart commands
http://support.microsoft.com/kb/840781
Of course write-protected not work under Linux
--------------------------------------------------------------------------------------------------------------------
II. Second method protected with FBWF - protected USB Flash Drive or USB Hard Disk tested with liveXP/2003
windows 7 not tested
1. set write protected with Diskpart to you USB Flash Drive or USB Hard Disk , see first method
(this is very important stage because FBWF not work if you USB-HDD/UFD is not write protected!!!)
2. Include in you project USB Mass Storage Dummy Filter Driver script, is need for UFD, but not for USB-HDD
this driver is necesary for convert UFD to disk
3. Build LiveXP Project, detail read post here
4. run script wimboot ; 5. modify CreateISO.script
in section If,%ok%,Equal,1,Run,%ScriptFile%,Process-do repaces with If,%ok%,Equal,1,Run,%ScriptFile%,Process-do2
add this lines
[Process-do2]
RegHiveLoad,WB_setup,%target_sys%\setupreg.hiv
RegWrite,HKLM,0x4,WB_setup\ControlSet001\Services\fbwf,WinPECacheThreshold,%pTextBox2%
RegHiveUnLoad,WB_setup
6. set cache to 300MB ; 7. run script CreateISO
8. download/use Bootable USB format utility -RMPrepUSB/BootICE or Fuwi USB-BootUtilities, i use RMPrepUSB
9. prepare UFD & USB HDD with - partition/format/install G4DOS... In RMPrepUSB use set option copy OS files to USB, rename i386 to MININT
10. Final. Boot from UFD or USB-HDD
after boot free space of you UFD = size of FBWF cache
you can copy only 263MB Compressed files(zip,wim...), but uncompressed more than 263MB !
Screenshot
I not tested with boot FULL Windows XP/2003 from USB or others methods of boot Windows XP/2003 from .IMG or .VHD,
but exist high probability to work with this method.