Jump to content

Windows XP Drivers


Recommended Posts

Right,another test is on the way.

What I have done.

Using my set up which copies all the drivers onto the system into Windows\NuDrvs\LAN. Edited DOSNET + edited TXTSETUP + my WINNT file I have added to $OEM$\$$\INF and inside here I have placed my driver.inf file.

The driver.inf file will be copied into Windows\INF nicely and I have edited the file,

[sourceDisksNames]

1=%systemroot%\NuDrvs\LAN,,,

[sourceDisksFiles]

Rtenic.sys = 1

Rtenicxp.sys = 1

Rtenic64.sys = 1

RTNicProp32.dll = 1

RTNicProp64.dll = 1

RTNUninst32.dll = 1

RTNUninst64.dll = 1

I have no idea if this is right or wrong. i have found nothing detailing this on the web at all. Which probebly inidicates it's wrong. Like all good experiments it comes down to trial and error....

What I ahve just thought about. Before i go to install I will remove the compressed driver.inf from the install source. Two of the same file might cause problems...

Link to comment
Share on other sites


Well test done...

Result.....

ohhhhhhhhhhhhhhhhhhhhhhhh soooooooooooooo close.

The install picked up the .inf file. It brought up "Found New Hardware" wizzard and I had to browse to my folder....C:\Windows\NuDrvs\lan

I had in my driver.inf

[sourceDisksNames]

1=%systemroot%\NuDrvs\LAN,,,

I had wrote it wrong...

Going to try again and ammend it to

[sourceDisksNames]

1=%systemroot%\NuDrvs\lan,,,

If that fails i will try

[sourceDisksNames]

1=C:\Windows\NuDrvs\lan,,,

Link to comment
Share on other sites

Compare

Drivers are copied to hard disk at a new directory

And HIVESFT.INF DevicePath is adjusted to this new directory.

Be aware: default txtsetup.sif used 8.3 file´names.

Longer names are expanded. Read txtsetup.sif for examples.

Try folder $OEM$\$1\Drivers\ and adjust DevicePath.

Link to comment
Share on other sites

Compare

Drivers are copied to hard disk at a new directory

And HIVESFT.INF DevicePath is adjusted to this new directory.

Be aware: default txtsetup.sif used 8.3 file´names.

Longer names are expanded. Read txtsetup.sif for examples.

Try folder $OEM$\$1\Drivers\ and adjust DevicePath.

that link is interesting. I have actually seen it before but this time around i understand more of this process. The

c) HIVESFT.INF

I. open c:\XPCD\content\I386\HIVESFT.INF and search for %SYSTEMROOT%\inf. the line should be

HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion","DevicePath",0x00020002,"%SYSTEMROOT%\inf"

II. add the custom driver path to this setting. this is the same path we used in 5.a.II. (%SYSTEMROOT%\nvidia\raid\). the line should look like

HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion","DevicePath",0x00020002,"%SYSTEMROOT%\inf;%SYSTEMROOT%\nvidia\raid"

III. save and close the file

is very interesting indeed... That could hold the key.....

The $OEM$\$1\Drivers........ i know of this way and i have tested it a couple of times and it works. I just dont want my drivers sat on the root of C: drive....... I know it's a small thing,but i am too far into this just to give up...

I have copying my files from sourc to destination locked down now. using etited DOSNET and TXTSETUP......I understand what changes to make and file system to use...

As for my latest tests.....Nope......Very close !!

With my edited driver.inf I still get the found new hardware wizzard popping up. It tells me that the files are in C:\Windows\NuDrvs\lan and that is exactly where they are but I still have to browse for them...

So it's not the missing piece..

I think my next test will be to forget about my driver.inf being copied into Windows\INF. Going to look at the "HIVESFT.INF" and add my folder path to that which contains ALL my driver files...

My destination folder path is "C:\Windows\NuDrvs\lan" So Looking at the "HIVESFT.inf" I should be looking at

HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion","DevicePath",0x00020002,"%SYSTEMROOT%\inf;%SYSTEMROOT%\NuDrvs\lan"

Definatly summet new to try....So I will....

Cheers for this new info "cdob"

Link to comment
Share on other sites

Your [sourceDisksNames] does not conform to it's syntax.

Try something like this

[SourceDisksNames]
1="NuDrvs LAN Files from current dir of this .inf sub dir",,,NuDrvs\LAN

and put your source file in C:\windows\inf\NuDrvs\LAN instead of C:\windows\NuDrvs\LAN

I think it will not prompt to browse for file.

Unfortunately I couldn't get the inf to pick up file from C:\windows\NuDrvs\LAN. It has to be from the '"installation root", which is where the inf resides.

Unless your driver.inf is located in C:\windows dir...

Link to comment
Share on other sites

Your [sourceDisksNames] does not conform to it's syntax.

Try something like this

[SourceDisksNames]
1="NuDrvs LAN Files from current dir of this .inf sub dir",,,NuDrvs\LAN

and put your source file in C:\windows\inf\NuDrvs\LAN instead of C:\windows\NuDrvs\LAN

I think it will not prompt to browse for file.

Unfortunately I couldn't get the inf to pick up file from C:\windows\NuDrvs\LAN. It has to be from the '"installation root", which is where the inf resides.

Unless your driver.inf is located in C:\windows dir...

Thanks for that. very interesting.......

I left things last night,too much buzzing round my head....

Picking it up again today And I am just about to test with the ammended HIVESFT file......This points to Windows\inf and my folders.....

Cheers for the extra info....... :thumbup

Link to comment
Share on other sites

DONE IT...

DONE IT ...

I have done it......

OHhhhhhhhhhhhhhhhhhhhhhhhhh yipeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee...

Just gunna write it up now........

:thumbup:thumbup:thumbup

Link to comment
Share on other sites

Right this is what i have done.

I'm sure you all know the simple things,obtaining the OS files,downloading the drivers,compressing the drivers. that sort of thing. But if you do need more info,just ask...

I compressed all my driver files and copied them to the source disc,

i386\NuDrvs\lan

I have amended four files

DOSNET.inf

TXTSETUP.sif

HIVESFT.inf

WINNT.sif

DOSNET.inf

[Directories]

d11 = "\i386\MyDrvs\lan"

[OptionalSrcDirs]

MyDrvs

[Files];LAN Drivers

d11,netrtle.cat

d11,netrtle.inf

d11,rtenic64.sys

d11,rtenic.sys

d11,rtenicxp.sys

d11,rtnicprop32.dll

d11,rtnicprop64.dll

d11,rtnuninst32.dll

d11,rtnuninst64.dll

TXTSETUP.sif

[sourceDisksNames]

500 = %cdname%,%cdtagfilei%,,"\i386\MyDrvs\lan"

[WinntDirectories]

600 = NuDrvs\lan

[sourceDisksFiles];LAN Drivers

netrtle.cat = 500,,,,,,,600,0,0

Netrtle.inf = 500,,,,,,,600,0,0

Rtenic.sys = 500,,,,,,,600,0,0

Rtenic64.sys = 500,,,,,,,600,0,0

Rtenicxp.sys = 500,,,,,,,600,0,0

RtNicprop32.DLL = 500,,,,,,,600,0,0

RtNicprop64.DLL = 500,,,,,,,600,0,0

RTNUninst32.dll = 500,,,,,,,600,0,0

RTNUninst64.dll = 500,,,,,,,600,0,0

HIVESFT.inf

HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion","DevicePath",0x00020002,"%SYSTEMROOT%\inf;%SYSTEMROOT%\NuDrvs\lan"

WINNT.sif

DriverSigningPolicy=Ignore

NonDriverSigningPolicy=Ignore

Amend all these files and copy them back into the source disk i386 folder.

This worked a treat.....And I can not express how happy this had made me feel....

I want to thank each person who has helped me with this project. Each person has held a piece of the puzzle and now they all fit perfectly.....

Well what I have to do now is ttry with more than one driver abd see what happens...

Thanks evry body...

:thumbup

Any questions just ask....

Edited by tnx
Link to comment
Share on other sites

Good job :thumbup

I've almost managed to do it too but using a different approach. I'm trying to add the drivers using exactly the same way as Micro$oft used. It's actually very simple :w00t: but I still need to go through the last step.

Link to comment
Share on other sites

Good job :thumbup

I've almost managed to do it too but using a different approach. I'm trying to add the drivers using exactly the same way as Micro$oft used. It's actually very simple :w00t: but I still need to go through the last step.

Sounds interesting....

Do tell please...

Link to comment
Share on other sites

I've done it. It is extremely easy.

1. Prepare your driver files. In my case I used the drivers for my Realtek RTL8111E LAN controller:

RtNicprop32.DLL
RTNUninst32.dll
Netrtle.inf
netrtle.cat
Rtenic.sys

2. Go to i386 and unpack driver.cab to a folder called "driver" in the i386 directory. You can use any archiver or just from commandline:

md driver
expand driver.cab -f:* driver

3. Copy your driver files to "i386\driver" except for the INF and CAT file:

RtNicprop32.DLL
RTNUninst32.dll
Rtenic.sys

4. Repack the driver.cab. From commandline inside the i386 directory:

cabarc -m lzx:21 N driver.cab driver\*

You can now remove the i386\driver folder.

5. Open i386\drvindex.inf and add the files from (3) to the list under [driver]. You can omit this step. It's only for informative purpose and doesn't play any practical role here.

6. Open the INF file (Netrtle.inf) and change:

[SourceDisksNames]
1=%DISKNAME%,,,

to

[SourceDisksNames]
1=%DISKNAME%,driver.cab,,"..\driver cache\i386"

7. Pack the INF and CAT files so that they become IN_ and CA_:

cabarc -m lzx:21 N Netrtle.in_ Netrtle.inf
cabarc -m lzx:21 N netrtle.ca_ netrtle.cat

Instead of packing you can just rename them to Netrtle.in_ and netrtle.ca_.

8. Move Netrtle.in_ and netrtle.ca_ to i386.

9. Open i386\txtsetup.sif and add:

[SourceDisksFiles]
Netrtle.inf = 1,,,,,,,20,0,0
netrtle.cat = 1,,,,,,,20,0,0

10. Open i386\dosnet.inf and add:

[Files]
d1,Netrtle.inf
d1,netrtle.cat

That's it. The drivers will be installed at this part of Windows setup (use classic setup in XP):

post-310716-0-78140100-1343837491_thumb.

There's exist also another method but it involves editing the layout.inf file which is digitally signed so you must "patch" syssetup.dll/setupapi.dll too. It's more complicated than this one anyway.

Link to comment
Share on other sites

I've done it. It is extremely easy.

1. Prepare your driver files. In my case I used the drivers for my Realtek RTL8111E LAN controller:

RtNicprop32.DLL
RTNUninst32.dll
Netrtle.inf
netrtle.cat
Rtenic.sys

2. Go to i386 and unpack driver.cab to a folder called "driver" in the i386 directory. You can use any archiver or just from commandline:

md driver
expand driver.cab -f:* driver

3. Copy your driver files to "i386\driver" except for the INF and CAT file:

RtNicprop32.DLL
RTNUninst32.dll
Rtenic.sys

4. Repack the driver.cab. From commandline inside the i386 directory:

cabarc -m lzx:21 N driver.cab driver\*

You can now remove the i386\driver folder.

5. Open i386\drvindex.inf and add the files from (3) to the list under [driver]. You can omit this step. It's only for informative purpose and doesn't play any practical role here.

6. Open the INF file (Netrtle.inf) and change:

[SourceDisksNames]
1=%DISKNAME%,,,

to

[SourceDisksNames]
1=%DISKNAME%,driver.cab,,"..\driver cache\i386"

7. Pack the INF and CAT files so that they become IN_ and CA_:

cabarc -m lzx:21 N Netrtle.in_ Netrtle.inf
cabarc -m lzx:21 N netrtle.ca_ netrtle.cat

Instead of packing you can just rename them to Netrtle.in_ and netrtle.ca_.

8. Move Netrtle.in_ and netrtle.ca_ to i386.

9. Open i386\txtsetup.sif and add:

[SourceDisksFiles]
Netrtle.inf = 1,,,,,,,20,0,0
netrtle.cat = 1,,,,,,,20,0,0

10. Open i386\dosnet.inf and add:

[Files]
d1,Netrtle.inf
d1,netrtle.cat

That's it. The drivers will be installed at this part of Windows setup (use classic setup in XP):

post-310716-0-78140100-1343837491_thumb.

There's exist also another method but it involves editing the layout.inf file which is digitally signed so you must which"patch" syssetup.dll/setupapi.dll too. It's more complicated than this one anyway.

Great work.

Will have o give it a go and see which is easier.

Link to comment
Share on other sites

This script will do the whole thing automatically:

SETLOCAL ENABLEDELAYEDEXPANSION
ECHO/>>I386\TXTSETUP.SIF
ECHO>>I386\TXTSETUP.SIF [SourceDisksFiles]
ECHO/>>I386\DOSNET.INF
ECHO>>I386\DOSNET.INF [Files]
ECHO/>>i386\drvindex.inf
ECHO>>i386\drvindex.inf [driver]
RD/Q/S i386\driver >NUL 2>&1
MD i386\driver
EXPAND i386\driver.cab -F:* i386\driver
FOR /F "tokens=* delims=" %%I IN ('DIR/AD/B/S drivers') DO (
FOR /F "tokens=* delims=" %%J IN ('DIR/A-D/B/S "%%I\*.inf" "%%I\*.cat"') DO (
SET EXT=%%~xJ
cabarc -m lzx:21 N "i386\%%~nJ!EXT:~0,-1!_" "%%J"
ECHO>>I386\TXTSETUP.SIF %%~nxJ = 1,,,,,,,20,0,0
ECHO>>I386\DOSNET.INF d1,%%~nxJ
)
FOR /F "tokens=* delims=" %%J IN ('DIR/A-D/B/S "%%I"') DO (
IF /I NOT "%%~xJ"==".inf" IF /I NOT "%%~xJ"==".cat" (
COPY "%%J" i386\driver
ECHO>>i386\drvindex.inf %%~nxJ
)
)
)
CABARC -m lzx:21 N i386\driver.cab i386\driver\*
RD/Q/S i386\driver
PAUSE

Edit: An updated version of the script is available in #47.

Just save it as drivers.cmd next to the i386. Then create a folder called "drivers" and inside it create separate folders for drivers for each device, ex.

drivers\realtek
drivers\soundblaster
etc.

You must edit the [sourceDisksNames] in all INF files manually and then you can run the script which will automatically do the rest of the integration.

Edited by tomasz86
Link to comment
Share on other sites

This script will do the whole thing automatically:

SETLOCAL ENABLEDELAYEDEXPANSION
ECHO/>>I386\TXTSETUP.SIF
ECHO>>I386\TXTSETUP.SIF [SourceDisksFiles]
ECHO/>>I386\DOSNET.INF
ECHO>>I386\DOSNET.INF [Files]
ECHO/>>i386\drvindex.inf
ECHO>>i386\drvindex.inf [driver]
RD/Q/S i386\driver >NUL 2>&1
MD i386\driver
EXPAND i386\driver.cab -F:* i386\driver
FOR /F "tokens=* delims=" %%I IN ('DIR/AD/B/S drivers') DO (
FOR /F "tokens=* delims=" %%J IN ('DIR/A-D/B/S "%%I\*.inf" "%%I\*.cat"') DO (
SET EXT=%%~xJ
cabarc -m lzx:21 N "i386\%%~nJ!EXT:~0,-1!_" "%%J"
ECHO>>I386\TXTSETUP.SIF %%~nxJ = 1,,,,,,,20,0,0
ECHO>>I386\DOSNET.INF d1,%%~nxJ
)
FOR /F "tokens=* delims=" %%J IN ('DIR/A-D/B/S "%%I"') DO (
IF /I NOT "%%~xJ"==".inf" IF /I NOT "%%~xJ"==".cat" (
COPY "%%J" i386\driver
ECHO>>i386\drvindex.inf %%~nxJ
)
)
)
CABARC -m lzx:21 N i386\driver.cab i386\driver\*
RD/Q/S i386\driver
PAUSE

Just save it as drivers.cmd next to the i386. Then create a folder called "drivers" and inside it create separate folders for drivers for each device, ex.

drivers\realtek
drivers\soundblaster
etc.

You must edit the [sourceDisksNames] in all INF files manually and then you can run the script which will automatically do the rest of the integration.

WOW....You have been a busy boy...That is vey clever.....

I thought i was doing well with my little scripts....

@echo off

type "Chipset Files List".txt | powershell -Command "$input | ForEach-Object {$_ -replace \"$\", \" = 500,,,,,,,600,0,0\"} | out-file SourceDisksFiles.txt"

pause

I have a script to make a list of file names in a certain folder. then that script adds the corresponding [sourceDisksFiles] info. Of course I have to make a new script for each driver but no big deal. Some of my drivers have a lot of files in them. This just makes it that little bit easier...

I like your script though.....

Wish i was that clever.. :w00t:

Edited by tnx
Link to comment
Share on other sites

tnx, glad you see it through and made it! And thanks to you and tomasz86 for sharing the solution. I think now only at msfn forum can a user find a solution even if they google hard.

I seems to have the impression that hfslip's driver integration method is similar to tomasz86's method.

Link to comment
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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...