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%,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.catInstead 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):
Number of downloads: 4
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.