Jump to content

Having Windows Keep The Drivers


X-Savior

Recommended Posts

Great Work Eric!

Ok, I will take the ball and run with it today.

I ran a few tests last night. I could not get Windows to look into the Extra.cab I made. The ONLY way it worked was to add the driver to /Driver Cache and the INF to \Inf.

I remove ALL traces of USB100M.SYS in all the 3 main files we have been dealing with and then it stopped working. So... It seems we MUST have a reference for it no matter what in the TXTSETUP.SIF I think. Or, it might be the DRVINDEX. That might make more sense for it there.

I will take your info and try some new installs today. :thumbup

Cheers!

Link to comment
Share on other sites


Remarks: not everything in this topic is completely new to me (and to others).

To make it the 'official' way, you'll have to add entries to dosnet.inf, txtsetup.sif and drvindex.inf. (This can relatively easily be added to the current DPs BASE, as I'm already editing all these files.)

About those txtsetup.sif values:

it starts with 1 or 100, 1 means XP Vanilla, 100 means SP1 (maybe also SP2, so any SP?)

I think the _3 is a IDE driver and the _4 is a RAID driver.

Anyway, you can find lots of info at microsoft.com and gosh's site about .inf files.

Link to comment
Share on other sites

@ Bashrat:

it starts with 1 or 100, 1 means XP Vanilla, 100 means SP1 (maybe also SP2, so any SP?)

If we want to add new drivers, does it matter if I use 1, or 100??

I don't think it matter, because you use the following for presetup.cmd

presetup.cmd= 1,,,,,,,2,0,0

And presetup ofcourse has nothing to do with the Vanilla version of XP.

EDIT:

I found this interesting post today, It comes from this forum (it didn't show up with the search function :no: .) It seems that this is a perfect way to A: install the drivers, B: let windows recognize the drivers when you plug an play a device: THNX. ALOT Serialzs :thumbup:thumbup (seems that I was getting very close aswell :P )

Edited by erik_demon
Link to comment
Share on other sites

@erik_demon: hehe, I got some eh... info for you:

The topic you link to, check the last post, Serialzs links to... a new topic with a new guide. Then read the 5th and 7th post and last but not least the 10th one.

Eventually I've moved to Pyrons method because it was basically the same as Serialzs' his. But with the advantage that Pyrons was properly working...

So in fact you are linking to my 'method 2' :P;)

That's what I've been saying throughout this entire topic: why are you making it so difficult??? If you just remove the lines that reset the DevicePath to %SystemRoot%\Inf, you can keep on using my DriverPacks, though they will be in uncompressed form then... But what you could do is making a hybrid method: use method 1 + Pyron's method: let the presetup.cmd COPY the drivers to the harddisk. This is VERY easily done, just use method 1 and change 2 lines of the presetup.cmd.

You won't have it actually 'slipstreamed' into Win XP, but it's very easy to accomplish.

However, if you want to go on with the things you were working on, I won't stop you ;)

Link to comment
Share on other sites

I noticed that as well :P

The goal of this topic was to let windows identify drivers when you plug them in, and use them even when the OS is already installed. like for instance, you just bought a wireless card and you want to use it without doing a format. (I would like that because my wireless card sucks :D ).

after reading Serialzs topic My intention are to do this:

- use your method 2 to extract the DP's and set the DevicePath like you did in method 2

- Use Cabarc to create a .CAB file from the extracted DP files (I still like to use the first step because .7zip is much smaller than .CAB)

- Copy the .CAB file to %systemroot%\Driver Cache\i386

Of course they DRVINDEX.INF has to be edited before this. This also makes sure that I don't have to edit txtsetup.sif, and dosnet.inf except for the .INF file which need to be in the i386 folder (or I create another .7Zip file with only inf files that need to be copied during presetup to the %systemroot%\INF folder)

This seems to be MUCH easier than I thought (I know, you said so :P )

There however still is one problem: How can i modify DRVINDEX.INF to look into subfolder of the .CAB file?? If this isn't possible, I won't create a .CAB file. Is it possible then to point DRVINDEX.INF in the direction of the normal subfolder. For instance: %systemroot%\Driver Cache\i386\DP\W\enz? (I don't know a great deal of INF files. I am learning though)

Edited by erik_demon
Link to comment
Share on other sites

Ok Guys,

This is new info and I will read inot what you guys are talking about kater tonight.

But none the less I have Reached our goal with a very simple solution. :thumbup

Eric, you were on the right track but I was broad-sided last night with some interesting results.

Here is what I have done...

1) I placed the INF in the $OEM$\$$\INF folder

DOSNET.INF

[Files]
d1,usb100m.sys
d1,extra.cab

DRVINDEX.INF

[Version]
CabFiles=SP2,Driver,Extra

[Extra]
usb100m.sys

[Cabs]
Extra = Extra.cab

TXTSETUP.SIF

[WinntDirectories]
241 = "Driver Cache"

[SourceDiskFiles]
extra.cab       = 100,,,,,,,241,0,0
usb100m.sys  = 100,,,,,,,,3,3
usb100m.cat  = 100,,,,,,,44,3,3

DriverCabName=Extra.cab,SP2.cab,Driver.cab

[FileFlags]
Extra.cab = 16

Then I learned that you also but have the New .Cab file in WinntDirectory 39 (\Driver Cache\I386)

So, what I have been missing is the fact that if you have just the *.sys in (\Driver Cache) it will work fine like that. But if you use a .Cab for the Drivers then there MUST be a copy of the Cab in Windows\Driver Cache AND Windows\Driver Cache\I386. :wacko:

So tonight I am going to modify the TXTSETUP.SIF to try and copy the new Cab to BOTH locations. Otherwise you can use the $OEM$\$$\Driver Cache for one and then use the TXTSETUP.SIF to copy the other to the proper location. If either cab file was missing the OS would fail to find the driver. I founf this VERY strange. There seems to be something VERY important with the \Driver Cache directory when looking for Drivers. :blink:

How does this sound to you people?

Link to comment
Share on other sites

X-Savior, first of all excellent work and I commend you on your tenacity with this. With that said, I checked a couple of installations and it appears that the built in driver cab files are only in the Windows\Driver Cache\i386 directory. It would seem to me that a custom cab shouldn't be any different.

Link to comment
Share on other sites

I agree, but it DOES make a difference. If the CAB is not in BOTH locations windows will NOT find the drivers and install will fail. I have tried removing either one and it quits working till I return the file again.

This is VERY strange but the way it seems to be. :(

Next, I would like to figure out how to have the drivers install without searching for them and have it NOT ask to find them on the internet.

It will then truely be Plug-In-Play. :)

Anyone have any experience to help us move this up to the next level?

PS) Thanx Rogue for the Pat on the Back. :thumbup

Link to comment
Share on other sites

Nice progress here :D:thumbup:

Good work, X-Savior ;)

And I, just as RogueSpear, went immediately to the %SystemRoot%\DriverCache folder to check if there were 2 .cab files... But then I saw RogueSpears post, so I guess I'm too late :P

Wouldn't it be some registry/.inf setting that could make it possible to keep only 1 .cab ?

Link to comment
Share on other sites

How does this sound to you people?

:w00t: PERFECT, GOOD JOB :thumbup

Although my approach will be a little different, I now know this method works. :thumbup

About the double .CAB file, I may have found something

Look at this place in the registry:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup]

There you will find:

DriverCachePath = %SystemRoot%\Driver Cache

It is binary code like this:

SEE ATTACHMENT

We can change this to

DriverCachePath = %SystemRoot%\Driver Cache\i386

like this:

SEE ATTACHMENT

Maybe now we need only one .CAB file in the %SystemRoot%\Driver Cache\i386 folder

EDIT:

For some reason, the binary code looked wrong when I posted it with the code tag. You can now see the code in the attachment

EDIT 2:

@X-Savior:

usb100m.cat  = 100,,,,,,,44,3,3

Why do you copy a .cat file to system32\dllcache?

driver_cache.zip

Edited by erik_demon
Link to comment
Share on other sites

Just thought of a little something. As part of my unattended install procedure I copy the i386 folder from the media to the \Windows directory and change the registry to look there for installation source files. I wonder if a new hardware detection would look there as well as the Driver Cache directory.

Just a thought...

Link to comment
Share on other sites

Okay, I am preparing myself for some testing tomorrow:

This is how my presetup.cmd will look like:

SET tagfile=\WINXP\I386\presetup.cmd
FOR %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do if exist "%%i:%tagfile%" set CDDRIVE=%%i:

%SystemDrive%
CD %SystemRoot%\system32

%SystemDrive%
CD \
%CDDRIVE%\WINXP\OEM\bin\7za.exe x -y -aoa %CDDRIVE%\WINXP\OEM\DriverPack_*.7z -o"%SYSTEMDRIVE%"

REM   +===============================================+
REM    |       NEW!!  CREATE A .CAB FILE               |
REM   +-----------------------------------------------+

%CDDRIVE%\WINXP\OEM\bin\cabarc.exe -r -p N %SystemDrive%\DP\DP-Erik.cab %SystemDrive%\DP\*

REM   +===============================================+
REM    |   COPY CAB file to 2 important dirs          |
REM   +-----------------------------------------------+

COPY "%SystemDrive%\DP\DP-Erik.cab" "%systemroot%\Driver Cache\"
COPY "%SystemDrive%\DP\DP-Erik.cab" "%systemroot%\Driver Cache\i386"

REM   +===============================================+
REM    |      DELETE DP-ERIK.CAB                       |
REM   +-----------------------------------------------+

del "%systemdrive%\DP\DP-Erik.cab" /q

%CDDRIVE%\WINXP\OEM\bin\SetDevicePath.exe %SystemDrive%\DP

START %CDDRIVE%\WINXP\OEM\bin\WatchDriverSigningPolicy.exe

REM SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REG ADD %KEY%\999 /V 1 /D "%CDDRIVE%\WINXP\OEM\bin\SetDevicePath.exe %SystemRoot%\Inf" /f

%CDDRIVE%\WINXP

No error here ;) I use this because I install from a second harddrive, an not from the root of that drive.

I tested the cabarc part. And it worked great

Could someone please check the above lines for errors??

EDIT:

@RogueSpear

change the registry to look there for installation source files

Could you explain me what reg keys you used here?

EDIT 2:

I tested the new Presetup.cmd in windows, and it works. It first extactacts the DP's, the it makes a .cab of them and copies them to "%systemroot%\Driver Cache\ and "%systemroot%\Driver Cache\i386. Then it deletes the .CAB file in the DP folder and goes on with the rest of the normal presetup section.

Edited by erik_demon
Link to comment
Share on other sites

strKeyPath = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\"
fs.CopyFolder (strCD & "i386"), (windir & "\i386"),True
If fs.FolderExists(windir & "\i386\svcpack") Then fs.DeleteFolder(windir & "\i386\svcpack"),True
ws.RegWrite strKeyPath & "SourcePath", "%systemroot%\\i386\\", "REG_SZ"
ws.RegWrite strKeyPath & "ServicePackSourcePath", "%systemroot%\\i386\\", "REG_SZ"

This is a mere piece of a much larger VBscript that I run from RunOnceEx. It should give you the basic idea though.

Link to comment
Share on other sites

Hey Guys!

@Erik

Very interesting what you are doing...

What does this do? Havn't seen that before. :unsure:

START %CDDRIVE%\WINXP\OEM\bin\WatchDriverSigningPolicy.exe

%CDDRIVE%\WINXP\OEM\bin\SetDevicePath.exe %SystemDrive%\DP

Also, Any luck with Sub Directory's? I am VERY interested in this as well. I have been too busy to get into testing it though. Been trying to refine the technique I outlined.

----

@Rogue

Yea, I would also like to know what you have done to the Registry. I tried your idea with changing it and it made no effect. :(

Maby I am missing something. Also, can you explain more about your script. What exactly does it do?

-----

Ok, now for what I have recently learned. We can trim down the steps. Now that this system works I have looked at what can be cut out. I was very surprised. This is my NEW revised method. I think it will simplify using lots of drivers. I am ready now to begin adding LOTS of peripherals to it now.

This is all that is required in total...

DOSNET.INF

[Files]
d1,Extra.cab

DRVINDEX.INF

[Version]
CabFiles=Extra,SP2,Driver

[Extra]
Usb100m.sys

[Cabs]
Extra=Extra.cab

TXTSETUP.SIF

[SourceDiskFiles]
Extra.cab = 100,,,,,,,39,0,0

DriverCabName=Driver.cab,SP2.cab,Extra.cab

[FileFlags]
Extra.cab = 16

Ok, so then I just add a copy of the *.Cab to...

$OEM$\$$\Driver Cache

And the *.INF to...

$OEM$\$$\INF

Done. So as you see, all the work is done creating the Initial CAB and then you just make entry's in the DRVINDEX.INF to reflect the added Drivers in the [Cab Name] section.

This should keep updating and changing the Cab File very simple... :thumbup

Now, if we can get the Sub Directory's to work then we have it made. (Outside of trying to have Windows try and find the Drivers without asking to Search the Internet (I think I Read something about that) and Have Windows Search for the Drivers FIRST. :huh:

Hopefully some of you have made more progress.

----

@Bashrat

What is your take on this, Any Info useful to you?

Link to comment
Share on other sites

@X-Savior

It's a registry trick I picked up from either Gosh or GreenMachine, I don't remember which at the moment. Now that I'm thinking about it driver.cab is copied to the HD by default so this is all probably irrelevent. I think the purpose of copying i386 and changing the reg is so that you can do an Add/Remove Windows components operation or in case a driver needs files from the XP source, you won't need the Windows XP media. A handy trick for those installs where the computer owner loses their media or gets confused easily.

But back to topic, it probably won't help out this situation.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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