congnt92 Posted April 29, 2013 Share Posted April 29, 2013 (edited) Hi everyone.Usbmuitiboot_10 is good but I want to edit USB_MultiBoot_10.cmd file to a small batch file, only use to copy xp sources and making $WIN_NT$.~BT Folder.I use this code to making $WIN_NT$.~BT Folder ( I copied from USB_MultiBoot_10.cmd file)@echo offSET cpyflag=0FOR /F "tokens=1,2,3* delims=, " %%G IN (H:\I386\DOSNET.INF) DO ( SET FTAG=%%G SET FTAG=!FTAG:~0,13! IF "!FTAG!"=="[FloppyFiles." ( SET cpyflag=1 IF "%%G"=="[FloppyFiles.x]" SET cpyflag=0 ) ELSE ( SET FTAG=!FTAG:~0,1! IF "!FTAG!"=="[" SET cpyflag=0 IF "!cpyflag!"=="1" ( SET btfile=%%H IF "%%I"=="" ( SET btfile=!btfile:~0,-1!* xcopy H:\I386\!btfile! usb_xpbt\$WIN_NT$.~BT /i /k /r /y /h ) ELSE ( copy /y H:\I386\%%H usb_xpbt\$WIN_NT$.~BT\%%I ) ) ))pause>nul( H:\ is xp source).But I didn't succeed. So you can help me edit this code to be a right codeGreat thanks :thumbup Edited April 29, 2013 by congnt92 Link to comment Share on other sites More sharing options...
wimb Posted April 29, 2013 Share Posted April 29, 2013 (edited) This initial code works, but it needs further improvement depending on your purpose ......:: ==========================================================================================================================:: ====================================== Make_XP_BT.cmd ====================================================================:: ==========================================================================================================================TITLE Make_XP_BT.cmd - Make XP Setup Bootfolder $WIN_NT$.~BT@ECHO OFFCLSSETLOCAL ENABLEEXTENSIONSSETLOCAL ENABLEDELAYEDEXPANSIONECHO *** Make Temporary Folder usb_xpbt with Custom XP Setup BootFiles ***ECHO.ECHO Parse DOSNET.INF for making Windows XP Setup Bootfolder $WIN_NT$.~BTECHO.: change according to your location of XP sourceSET xpsource=H:IF EXIST usb_xpbt\nul rd /S /Q usb_xpbtIF NOT EXIST usb_xpbt\nul MD usb_xpbt:: Make Destination directories for XP Setup BootfolderIF NOT EXIST usb_xpbt\$WIN_NT$.~BT\nul MD usb_xpbt\$WIN_NT$.~BTIF NOT EXIST usb_xpbt\$WIN_NT$.~BT\system32\nul MD usb_xpbt\$WIN_NT$.~BT\system32SET cpyflag=0FOR /F "tokens=1,2,3* delims=, " %%G IN (%xpsource%\I386\DOSNET.INF) DO ( SET FTAG=%%G SET FTAG=!FTAG:~0,13! IF "!FTAG!"=="[FloppyFiles." ( SET cpyflag=1 IF "%%G"=="[FloppyFiles.x]" SET cpyflag=0 ) ELSE ( SET FTAG=!FTAG:~0,1! IF "!FTAG!"=="[" SET cpyflag=0 IF "!cpyflag!"=="1" ( SET btfile=%%H IF "%%I"=="" ( SET btfile=!btfile:~0,-1!* xcopy %xpsource%\I386\!btfile! usb_xpbt\$WIN_NT$.~BT /i /k /r /y /h ) ELSE ( copy /y %xpsource%\I386\%%H usb_xpbt\$WIN_NT$.~BT\%%I ) ) ))IF EXIST usb_xpbt\$WIN_NT$.~BT\NTLDR DEL usb_xpbt\$WIN_NT$.~BT\NTLDRECHO.ECHO Making Windows XP Setup Bootfolder usb_xpbt\$WIN_NT$.~BT - READYECHO.ENDLOCALpauseEXIT:: ==========================================================================================================================:: ====================================== END Make_XP_BT.cmd ================================================================:: ========================================================================================================================== Edited April 29, 2013 by wimb Link to comment Share on other sites More sharing options...
congnt92 Posted April 29, 2013 Author Share Posted April 29, 2013 (edited) Great. I did succeed. MANY THANKS for your help, wimb. Two lines: SETLOCAL ENABLEEXTENSIONS and SETLOCAL ENABLEDELAYEDEXPANSION make the difference. :yes: Edited April 29, 2013 by congnt92 Link to comment Share on other sites More sharing options...
congnt92 Posted April 29, 2013 Author Share Posted April 29, 2013 (edited) @wimb, I still have a question. I'm sorry about this. I don't want to start new topic with a small problem.I hexedited setupldr.bin and change string $WIN_NT$.~BT .by AAA\BBB\CCCC (enough 12 characters) but I get a error message "the disk labeled windows xp service pack 3 cd into A drive.....press enter when ready." It seems like the /i386/setupldr.bin finds the winnt.sif in the root of the stick and loads it, thus starting installation. And when the directory of winnt.sif file was changed, error message popup.You can tell me how to hexedit setupldr.bin correctlyThanks :thumbup Edited April 29, 2013 by congnt92 Link to comment Share on other sites More sharing options...
jaclaz Posted April 29, 2013 Share Posted April 29, 2013 I hexedited setupldr.bin and change string $WIN_NT$.~BT .by AAA\BBB\CCCC (enough 12 characters) WHY? Setupldr.bin may be not the only place where $WIN_NT$.~BT is referenced, setupdd.sys could be another place to look for it ..... See :jaclaz Link to comment Share on other sites More sharing options...
congnt92 Posted April 29, 2013 Author Share Posted April 29, 2013 (edited) @jaclaz. I renamed $WIN_NT$.~BT to WXPBootFiles (12 character) and hexedited setupldr.bin too. And I don't get error message when I setup Windows. But if I rename and hexedit $WIN_NT$.~BT to AAA\BBB\CCCC (enough 12 character too) when I setup Windows, I get message error. So I think, winnt.sif can't be put in sub folder? Edited April 29, 2013 by congnt92 Link to comment Share on other sites More sharing options...
jaclaz Posted April 29, 2013 Share Posted April 29, 2013 (edited) @jaclaz. I renamed $WIN_NT$.~BT to WXPBootFiles (12 character) and hexedited setupldr.bin too. And I don't get error message when I setup Windows. But if I rename and hexedit $WIN_NT$.~BT to AAA\BBB\CCCC (enough 12 character too) when I setup Windows, I get message error. So I think, winnt.sif can't be put in sub folder?The given thread is about a sub-folder.Maybe it is not possible in a sub-subfolder, or maybe the "second part" must be \I386, but if Victor888 edited setupdd.sys, maybe there was a reason for that edit. I tried vainly at the time to get more details/have the results of some other tests.BTW, you did not answer to the WHY you would want to do that.jaclaz Edited April 29, 2013 by jaclaz Link to comment Share on other sites More sharing options...
congnt92 Posted April 30, 2013 Author Share Posted April 30, 2013 (edited) So, We can rename $WIN_NT$.~BT to any string which enough 12 characters and edit setupldr.bin to reference but we can't rename $WIN_NT$.~BT to a tree directory (AAA\BBB\CCCC). That's right?And still I have some problems. You can tell me how to move NTDETECT.COM to a folder. Edit NTLDR, edit setupldr.bin or edit setupdd.sys? Edited April 30, 2013 by congnt92 Link to comment Share on other sites More sharing options...
bphlpt Posted April 30, 2013 Share Posted April 30, 2013 @congnt92WHY? BTW, you did not answer to the WHY you would want to do that.Well???Cheers and Regards Link to comment Share on other sites More sharing options...
congnt92 Posted April 30, 2013 Author Share Posted April 30, 2013 (edited) @jaclaz @bphlpt: I want to move NTDETECT and txtsetup.sif on USB Root to a folder in order to have a Clean Root. Edited April 30, 2013 by congnt92 Link to comment Share on other sites More sharing options...
jaclaz Posted April 30, 2013 Share Posted April 30, 2013 @jaclaz @bphlpt: I want to move NTDETECT and txtsetup.sif on USB Root to a folder in order to have a Clean Root. No. You want to have a clear root AND you assumed that the only way is to start doing strange things inside the files, renaming paths etc. (it's not exactly the same thing).One of the possible answer to the simpler question:How can I have a Clean Root?is:Since you are anyway using grub4dos (and if you are not now is the right moment to start using it), make a bootable NT floppy image and map it in grub4dos.IMHO this is simpler than anything else.See:http://www.xxcopy.com/xxcopy33.htmI can see no issues with doing the same with SETUPLDR.BIN, actually that is how the setup works when started from Floppy (yes, probably you need to go to a museum to see an actual floppy, but when XP came out in 2001 almost any PC would have had a floppy drive).MS still provides the floppy images:http://support.microsoft.com/default.aspx?scid=kb;en-us;Q310994(check the first floppy of the 6-floppy set )jaclaz Link to comment Share on other sites More sharing options...
congnt92 Posted April 30, 2013 Author Share Posted April 30, 2013 You may not know it but you helped me a lot. Thankyou, jaclaz :thumbup Link to comment Share on other sites More sharing options...
congnt92 Posted April 30, 2013 Author Share Posted April 30, 2013 (edited) @jaclaz, please help me.I copy files in $WIN_NT$.~BT folder and creat XP.ima with these files. I put it in USB root and use grub4dos to boot.Here my menu.lsttitle First part of Windows XP Professional setupmap --mem /XP.ima (fd0)map --hookroot (fd0)chainloader /SETUPLDR.BINtitle Second part of Windows XP Professional setuproot (hd0,0)chainloader (hd0,0)/NTLDRBut I get a error message, please insert the disk labeled Windows XP Pro sp3 Setup Disk #5 into Drive A:. Press Enter when ready.So you can help me edit menu.lst ?p/s:my usb rootXP.imagrldrmenu.lstboot.ini$WIN_NT$.~LSNTDETECT.COMntldrtxtsetup.sif Edited April 30, 2013 by congnt92 Link to comment Share on other sites More sharing options...
jaclaz Posted April 30, 2013 Share Posted April 30, 2013 The menu.lst seems OK. What are the contents of the XP.ima ?How big it is?How did you create the .ima?It is strange that you are asked for disk #5 (I mean, if the issue is the diskette, then it would be logical that it would have protested for #2, #3 and #4 first )jaclaz Link to comment Share on other sites More sharing options...
congnt92 Posted April 30, 2013 Author Share Posted April 30, 2013 The menu.lst seems OK. What are the contents of the XP.ima ?How big it is?How did you create the .ima?jaclazI using UltraISO to creat XP.ima. I drag the files which $WIN_NT$.~BT Folder content and drop into UltraISO and save with .IMA format. So size XP.IMA aproximatelly size of $WIN_NT$.~BT Folder.I map mem XP.ima whole $WIN_NT$.~LS folder on the USB root. The difference of directory make this error. That's right? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now