fusan Posted June 27, 2008 Posted June 27, 2008 I have a "working" USB installation from a 16 GB stick.The installation is created using Bart PE by copying windows install files to the HD withthe /makelocalsource switch when calling Winnt32.exe.Everything works fine untill it tryes to copy files when Winnt32.exe is running.What happens here is a delay on 2-4 min were the USB is very active but no copyingis taking place after a few min the windows install starts to copy and everything is fine.When I look at the USB stick after the winstallation has ended, I find this dir on it:Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeysThis dir is btw totaly empty.I have to mention that Im placing Documents and Settings on drive D: and it is placed on D: when everything is done, but a little part og it just gets on the USB and that is why there is this anoying delay before the copy of the windows installation to the HD.I have this installation on DVD to and it works like a charm... just not from the USBSo why on earth does it have to copy that dir to USB?
fusan Posted June 30, 2008 Author Posted June 30, 2008 Still no answers... Maybe Im not expressing myself clearly enough...Let me try in another way...When I call: winnt32.exe from BartPE, one dir (Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys) is copied to the USB stick before the windows installation is being copied to the HD (by winnt32.exe).After the whole installation is done, everything is fine, except that tha USB now containsthe "Documents and Settings..." (look above) dir and it has delayed the installation unnessesery.Why is that and how can I avoid this?
jaclaz Posted June 30, 2008 Posted June 30, 2008 So why on earth does it have to copy that dir to USB?Why is that and how can I avoid this?Just a guess, but you need to make the USB source "read only".Try using this:http://www.xabersoft.com/http://www.xabersoft.com/freebies.htmlhttp://www.xabersoft.com/download/usbwriteblocker.zipWould it work in BartPE?Cannot say. The only alternatives that come to my mind:1) Use a RAMDISK loading of a .ISO for booting BartPE (needs files from Server2003 SP1 or R2)2) Use EWF (needs files from Windows Embedded)jaclaz
fusan Posted June 30, 2008 Author Posted June 30, 2008 (edited) @JaclazI just found out that it is not the copying of windows that creates the dir "Documents and Settings..."Making the drive write protected is a great idear. The utility that you link to unfortunetly uses a reg keythat does not exist in BartPE. Maybe if I could ad this reg key when Bart is loading it would work, but I dont know what to edit toinclude it there without making a new build and that would take a lot of work since I added a load of newstuff to the USB.Anyway Im totaly cluesless about what causes the delay now. Edited June 30, 2008 by fusan
cdob Posted June 30, 2008 Posted June 30, 2008 Making the drive write protected is a great idear. The utility that you link to unfortunetly uses a reg key that does not exist in BartPE.You may add a file \minint\system32\migrate.inf to BartPE. Set StorageDevicePolicies at migrate.inf, compare http://www.msfn.org/board/-t61384.html&...st&p=638830Anyway Im totaly cluesless about what causes the delay now.How long does delay durate?Are there another write/read acess to USB stick? Did you integrated sysinternals filemon?Do you use FAT32? This may delay file acess at USB stick.Do you use fast USB hardware? Fast access time is more importand, fast transfer speed is next.
fusan Posted July 1, 2008 Author Posted July 1, 2008 @ cdobI have created a migrate.inf and placed it in minint\system32 but when I check the registry, nothing is added.This is my migrate.inf:[Version]Signature = "$Windows NT$"[Addreg]HKLM,"SYSTEM\CurrentControlSet\Control\StorageDevicePolicies","WriteProtect"=dword:00000001> How long does delay durate?The delay can vary but usually takes 2-5 min> Are there another write/read acess to USB stick? Im not copying anything to the stick... whern I start Winnt32.exe .... and just before it gets to the part werewindows is to copy files/its installation to the HD this delay in starts and this is were the little flashlight is flashing like crazy, but apperently nothing gets copied... really weird.> Did you integrated sysinternals filemon?No, does it work in Bart PE?> Do you use FAT32? This may delay file acess at USB stick.No Im using NTFS. The disk is wiped, partitioned and formated before the call to Winnt32.exe> Do you use fast USB hardware? Fast access time is more importand, fast transfer speed is next.Yes the USB stick is formated in Fat32... I dont think it is possible to make a bart PE boot in NTFS.
jaclaz Posted July 1, 2008 Posted July 1, 2008 This is my migrate.inf:[Version]Signature = "$Windows NT$"[Addreg]HKLM,"SYSTEM\CurrentControlSet\Control\StorageDevicePolicies","WriteProtect"=dword:00000001Try using, AS IN THE GIVEN EXAMPLE, ControlSet001, most probably when migrate.inf is parsed the "reg-link" between ControlSet001 and CurrentControlSet is not yet established.CurrentControlSet is a "mirror" or either ControlSet001, or ControlSet002, .....ControlSetnnn, in other words when you open an offline Registry, there is NO CurrentControlSet, it is created on-the-fly by Windows when booting.When windows is running, using CurrentControlSet is advised, but otherwise you need to use ControlSet001.jaclaz
fusan Posted July 1, 2008 Author Posted July 1, 2008 @jaclazThx for the correct syntax... but my problem is that Bart dont even read the migrate.infcus after I check the registry in Bart I dont se any changes at all.
cdob Posted July 2, 2008 Posted July 2, 2008 HKLM,"SYSTEM\CurrentControlSet\Control\StorageDevicePolicies","WriteProtect"=dword:00000001This is not a valid line: dword: dosn't work.Try the previous named example. Don't change this for first testings.Sysinerals filemon work at BartPE, if you use a proper plugin.No idea about injecting files after. May work or fail.A log should show cause of 2-5 min delay.Yes the USB stick is formated in Fat32... I dont think it is possible to make a bart PE boot in NTFS.BartPE boot from a NTFS USB stick. However BIOS has to support USB NTFS boot first.
fusan Posted July 3, 2008 Author Posted July 3, 2008 I have now tried to use following syntax in migrate.inf:HKLM,"SYSTEM\CurrentControlSet\Control\StorageDevicePolicies","WriteProtect",0x10001,1HKLM,"SYSTEM\ControlSet001\Control\StorageDevicePolicies","WriteProtect",%REG_DWORD%,1HKLM,"SYSTEM\ControlSet001\Control\StorageDevicePolicies","WriteProtect",0x10001,1HKLM,"SYSTEM\ControlSet001\Control\StorageDevicePolicies","WriteProtect"=DWORD:00000001None of them work... when you guys mention "previous/given example" witch one do you refer to then?
fusan Posted July 9, 2008 Author Posted July 9, 2008 Still no answer on the migrate.inf syntax?Well Ive used Filemon and stored the values in txtfiles.I used filemon under the delay and right after whenwindows started to copy the installation files to the HD.There was actually no difference on those two files exceptwhat is shown in the attached picture.And I have no clue what the diffence means... any goodideas?
jaclaz Posted July 9, 2008 Posted July 9, 2008 Reference is here:http://www.msfn.org/board/How-to-boot-inst...html&st=111Yours should be:[Version]Signature = "$Windows NT$"[Addreg];WriteProtect USBHKLM,"SYSTEM\ControlSet001\Control\StorageDevicePolicies","WriteProtect",%REG_DWORD%,1[Strings];Handy macro substitutions (non-localizable)REG_SZ = 0x00000000REG_BINARY = 0x00000001REG_DWORD = 0x00010001REG_MULTI_SZ = 0x00010000REG_SZ_APPEND = 0x00010008REG_EXPAND_SZ = 0x00020000 or[Version]Signature = "$Windows NT$"[Addreg];WriteProtect USBHKLM,"SYSTEM\ControlSet001\Control\StorageDevicePolicies","WriteProtect",0x00010001,1 Then, you have to BOTH add hiveOEM.inf AND add the entry for it in txtsetup.sif as explained in the referenced post.jaclaz
cdob Posted July 9, 2008 Posted July 9, 2008 fusan@I don't use a 16GB USB stick. Migrate.inf may fail.Try editing registry:run regedit, load file \minint\setupreg.hivAdd writeprotect setting.Which winnt32 command do you use?Do you set syspart and tempdrive?
fusan Posted July 10, 2008 Author Posted July 10, 2008 First of all, Thx for the answers guys.@jaclazI did not read the entire historical post but I must be very close by now.But it didnt help yet though.Ive added hiveoem.inf with the lines you suggested to minint\system32.Then I created the entry: AddReg = hiveoem.inf,AddReg to txtsetup.sif under [HiveInfs.Fresh] but Nada happend nothing is changed in the registry @cdobI oppened regedit in Bart, marked HKÉY_LOCAL_MACHINE and Loaded setupreg.hiv. Then I added the key: StorageDevicePolicies under SYSTEM\Controlset001\Control\.Under StorageDevicePolicies I created a new value called WriteProtect as a DWORD.the Data I added to the WriteProtect key was 00010001.When I restarted the PC, it stopped right after the WindowsLogo Screen (just before itstarts to load the GUI) and it didnt go further from there.This is positive, because now Im certan that somthing is actually happening and maybeit is just the syntax that is wrng... but what part is could it be?Im really sorry to bother you guys so much with all this, you have used enough of your time but I really feel so close to solving this.
jaclaz Posted July 10, 2008 Posted July 10, 2008 (edited) Then I added the key: StorageDevicePolicies under SYSTEM\Controlset001\Control\.Under StorageDevicePolicies I created a new value called WriteProtect as a DWORD.the Data I added to the WriteProtect key was 00010001.Maybe that's it, "00010001" is the "code" for DWORD, the actual value of the key in Registry must be either 0 (write protect disabled) or 1 (write protect enabled).Some reference:http://www.everythingusb.com/writeprotect_registry.htmlhttp://www.accessdata.com/media/en_us/prin...otect.en_us.pdfjaclaz Edited July 10, 2008 by jaclaz
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now