Sign in to follow this  
Followers 0
congnt92

Need Help! Parse DOSNET.INF for making $WIN_NT$.~BT Fold

25 posts in this topic

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 off

SET cpyflag=0

FOR /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 code

Great thanks :thumbup :thumbup :thumbup

Edited by congnt92
0

Share this post


Link to post
Share on other sites

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 OFF
CLS

SETLOCAL ENABLEEXTENSIONS
SETLOCAL ENABLEDELAYEDEXPANSION

ECHO *** Make Temporary Folder usb_xpbt with Custom XP Setup BootFiles ***
ECHO.
ECHO Parse DOSNET.INF for making Windows XP Setup Bootfolder $WIN_NT$.~BT
ECHO.

: change according to your location of XP source
SET xpsource=H:

IF EXIST usb_xpbt\nul rd /S /Q usb_xpbt
IF NOT EXIST usb_xpbt\nul MD usb_xpbt

:: Make Destination directories for XP Setup Bootfolder
IF NOT EXIST usb_xpbt\$WIN_NT$.~BT\nul MD usb_xpbt\$WIN_NT$.~BT
IF NOT EXIST usb_xpbt\$WIN_NT$.~BT\system32\nul MD usb_xpbt\$WIN_NT$.~BT\system32

SET cpyflag=0
FOR /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\NTLDR

ECHO.
ECHO Making Windows XP Setup Bootfolder usb_xpbt\$WIN_NT$.~BT - READY
ECHO.

ENDLOCAL

pause
EXIT

:: ==========================================================================================================================
:: ====================================== END Make_XP_BT.cmd ================================================================
:: ==========================================================================================================================

Edited by wimb
0

Share this post


Link to post
Share on other sites

Great. I did succeed. MANY THANKS for your help, wimb. Two lines: SETLOCAL ENABLEEXTENSIONS and SETLOCAL ENABLEDELAYEDEXPANSION make the difference. :yes: :yes: :yes:

Edited by congnt92
0

Share this post


Link to post
Share on other sites

@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 correctly

Thanks :thumbup :thumbup :thumbup

Edited by congnt92
0

Share this post


Link to post
Share on other sites

I hexedited setupldr.bin and change string $WIN_NT$.~BT .by AAA\BBB\CCCC (enough 12 characters)

WHY? :w00t:

Setupldr.bin may be not the only place where $WIN_NT$.~BT is referenced, setupdd.sys could be another place to look for it ..... :whistle:

See ;) :

jaclaz

0

Share this post


Link to post
Share on other sites

@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 by congnt92
0

Share this post


Link to post
Share on other sites

@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. :unsure:

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 by jaclaz
0

Share this post


Link to post
Share on other sites

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? :rolleyes:

Edited by congnt92
0

Share this post


Link to post
Share on other sites

@congnt92

WHY? :w00t:
BTW, you did not answer to the WHY you would want to do that.

Well???

Cheers and Regards

0

Share this post


Link to post
Share on other sites

@jaclaz @bphlpt: I want to move NTDETECT and txtsetup.sif on USB Root to a folder in order to have a Clean Root. :rolleyes:

Edited by congnt92
0

Share this post


Link to post
Share on other sites

@jaclaz @bphlpt: I want to move NTDETECT and txtsetup.sif on USB Root to a folder in order to have a Clean Root. :rolleyes:

No. :no:

You want to have a clear root AND you assumed :ph34r: 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.htm

I 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

0

Share this post


Link to post
Share on other sites

You may not know it but you helped me a lot. Thankyou, jaclaz :thumbup :thumbup :thumbup

0

Share this post


Link to post
Share on other sites

@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.lst

title First part of Windows XP Professional setup

map --mem /XP.ima (fd0)

map --hook

root (fd0)

chainloader /SETUPLDR.BIN

title Second part of Windows XP Professional setup

root (hd0,0)

chainloader (hd0,0)/NTLDR

But 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 root

XP.ima

grldr

menu.lst

boot.ini

$WIN_NT$.~LS

NTDETECT.COM

ntldr

txtsetup.sif

Edited by congnt92
0

Share this post


Link to post
Share on other sites

The menu.lst seems OK. :thumbup

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 :unsure:)

jaclaz

0

Share this post


Link to post
Share on other sites

The menu.lst seems OK. :thumbup

What are the contents of the XP.ima ?

How big it is?

How did you create the .ima?

jaclaz

I 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?

0

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.