Topic: New Project Started - Download and Install on Demand

Part of another project Bluepill, I want to replace the manual WindowsUpdate Hardware updates system with driverpacks.net hands-free. But instead of forcing Bluepill user (who might be running on only a 4gb hard disk) to download 500 meg of compressed driverpacks including all the 3rd party ones, I have seen this requested on these forums, I have started a application in C# 2.0 that will download only the drivers present in the local computer.

The way it works/will work is this:
* Download DP*.7z's
* Extract them all to a local folder, for example, C:\DriverPacks\
* You then run the application i'm writing and point it to same folder as above, C:\DriverPacks\
* It then scans all .inf files and creates a devices.txt file that looks like this:

PCI\VEN_10B9&DEV_5473=C\AU\ALiSDIFA.inf
PCI\VEN_10B9&DEV_5473=C\AU\ALISDIF.SYS
*ALI5123=C\AU\IRALI.INF
*ALI5123=C\AU\aliirda.sys
PCI\CC_0C0310=C\AU\usb.inf
PCI\CC_0C0300=C\AU\usb.inf

* Upload the devices.txt and the extracted driver packs to any web server accessible by your target computer, for example, http://server.local/DriverPacks/  ( or http://ondemand.driverpacks.net/ hint hint wink )
* On the target computer, you then run another application (which I've yet to write), accepting 2 command line arguments; url (http://server.local/DriverPacks/) and local directory to save to (%SystemRoot%\DriverPacks)
  -  fetches the remote devices.txt
  -  executes a "devcon hwids *" which looks like:-

USB\VID_05A9&PID_A511\5&160F4E1&0&1
    Name: Dual Mode USB Camera Plus #2
    Hardware ID's:
        USB\Vid_05a9&Pid_a511&Rev_0100
        USB\Vid_05a9&Pid_a511
    Compatible ID's:
        USB\Class_ff&SubClass_00&Prot_00
        USB\Class_ff&SubClass_00
        USB\Class_ff

-  scan the devices.txt file. for each device:-
      -  for each "Hardware ID" listed, in order from top, stopping after first match.
      -  when first match is found, all files linked to the matched Hardware ID will be queued for download
  -  download the queue, and put them into %SystemRoot%\DriverPacks as normal
* You'd then need to 'post-install' the new drivers, perhaps by using the latest version of 'FINI'

The opensource for both applications mentioned above (collator+downloader) resides at SVN svn://meedios.svn.sourceforge.net/svnroot/meedios/plugins/binary64/Bluepill/DriverUpdater - I will post binaries to this thread when it's at beta quality.

RFC!! Questions? Feedback? Advice? Help?

Last edited by binary64 (2007-06-30 15:14:35)

Re: New Project Started - Download and Install on Demand

The plan was already to provide something like this. The new website is phase 1 to get there.
Unfortunately, this is not something you can build overnight. It has to be built solidly, easy to adminster (or at least not superfluously difficult) and must be scalable. Definitely if hundreds (if not thousands) of computers will be accessing this directly like you are suggesting here.
I'm sure you know stuff like this costs a LOT of time to develop. So unless somebody steps up to sponsor the development of this, I will not even give an estimate for when this will be ready.

Comments on your current approach: it looks hacky, it is hacky, but it will work just fine. The DriverPacks themselves are hacky as well due to the nature of drivers (which again is due to the (lacking) possibilities and (lacking) requirements of the Windows NT5.x kernel driver architecture and probably even more so due to the management/driver programmers at hardware companies).
The most important question: why exactly do you need this? I'd love to see a reply to that one.

Founder of DriverPacks.net — wimleers.com

Re: New Project Started - Download and Install on Demand

Ok.. as to why.. well integrating (slipstreaming) drivers is okay, but drivers update often, so in theory you'd want to repack all your windows install cd's. not only that, but pre-existing installations are now outdated. If you get a customer query about a machine, you now won't know if it's using previous drivers or the latest.

The idea of Bluepill is the automated windows installation is always the same, never updated. Using the internet it downloads and install latest updates. Because the install cd is old, i want client to fetch latest driver, without it downloading 500mb+.

I've finished the alpha version... there are some issues.. 3 nvidia drivers match my hardware id's.. which one is correct? also should fx5200 cards be using 8x.xx forceware not 9x.xx?

Also, I notice not all the nvidia files are referenced in the .inf. Is this because of co-installers? Should I be downloading the entire directory the .inf resides in? Or can more than 1 driver be in each folder?

I have some questions, apart from guessing, could you confirm what these tools do please:-
DevPath.exe - what/where does it set the info.. a registry entry?
DPsFnshr.exe - what exactly does this do? and does the main /D/ folder HAVE to be in %DriveRoot%?
DP*.ini - does Finisher use this?
save_hwids.exe - does this output same info as i parse with devcon?

But this system, in the end, should use less server juice.. as far less gets downloaded. And no scripts or database required on the server, just pure http. The devices.txt is about 1 meg.

So, is there a way we can work together on this? I mainly need advice about .inf's I guess.

Last edited by binary64 (2007-07-01 09:51:33)

Re: New Project Started - Download and Install on Demand

You should use the correct algorithm for selecting the right driver for your system.... you can find details about that on MSDN.

nVidia's drivers actually do not require separate installers, ATI for example does for the CCC.

DevPath.exe == DevicePath.exe, google for that.
DPsFnshr.exe == the Finisher, this is written by me, it handles all the exceptions (mostly control panels), see the per-DriverPack .ini's for details
Yes the Finisher uses those .ini's.
save_hwids.exe is indeed just a devcon wrapper.

Well, *YOU* just need advice on .inf's. But *I* will have to take care of the server-side stuff - which would have to be automated. I want to make this reality, but have no ETA. So... no promises wink

Founder of DriverPacks.net — wimleers.com

Re: New Project Started - Download and Install on Demand

hi
The devices.txt is about 1 meg.

I am curious as h*ll. Where do I find it?

EDIT, the DriverPacks project can benefit if we get a truly reliable database of what is in currently in DriverPacks, and what we have in the collections of drivers we all seem to build.

In the last few months at DriverPacks, I have been trying to get duplicates out where they harm most.
Each and every update can undo hours of work when a dupe is missed.

and... a reliable devices txt could be used for that post vanilla fini stuff, if conflicting drivers are already screened.

Last edited by jtdoom (2007-07-04 13:00:50)

The answer was 42?
Kind regards, Jaak.

Re: New Project Started - Download and Install on Demand

Hi,

I personally unzipped all the DriverPacks (including some of the 3rd party ones) onto a networked shared drive.
Then I use a small tool I wrote to build a list of folders which contain the drivers and save it in a simple XML file that I use with Microsoft's own dpinst (Driver Installation Tools 2.01).

This way all I need to slipstream to an unattended CD are the network and chipset drivers. (Haven't done mass storage yet). Then during RunOnceEx, I mount the repository and run dpinst.

It seems to work well with vmware and a Dell Latitude D505 I use for testing. So I'm hopeful it'll scale well to other hardware. I have too many systems which don't have a dvd drive so this seems like the best choice to support most hardware automatically.

Re: New Project Started - Download and Install on Demand

erm, digs up the DDK tools on DVD.. I have a ton to learn still.

The answer was 42?
Kind regards, Jaak.

Re: New Project Started - Download and Install on Demand

http://meedios.com/bluepill/devices.zip

Re: New Project Started - Download and Install on Demand

grrr driverpacks.net lost my post.

jtdoom: in addition to a driver db of hwids, it would be nice to have each individual driver pre-zipped so client doesn't download loads of tiny files per driver. also ability for user to upload a .zip containing 1 or more drivers, and php could automatically add the inf hwids to db and copy zip into public archive.. that way a load of us could churn through our old driver CD's (that came with hardware) since 1998 and upload them all very easily (~1 mouse click per CD).

Bâshrat the Sneaky: i am willing to help, modestly, toward this effort. Just let me know how I could help.

Ventajou: Thank you so much for registering to post a reply. I had not heard of dpinst, it sounds exactly what we all need. Is there any chance, please, for a copy of your work (the xml, any custom .exe's, dpinst command line switches, bat's, etc). It would be awesomely appriciated, as I assume you've worked out the ultimate flags/args to set eg /q switch, legacyMode = on, <search> element, etc.

Re: New Project Started - Download and Install on Demand

fyi, to save anyone searching for "Microsoft's own dpinst (Driver Installation Tools 2.01)", it's at http://www.microsoft.com/whdc/driver/in … Fxtls.mspx

Re: New Project Started - Download and Install on Demand

Hi again.

Sample XML file:

<?xml version="1.0"?>
<dpInst>
    <quietInstall />
    <scanHardware />
    <language code="0x0409">
        <dpinstTitle>Drivers Installer</dpinstTitle>
    </language>
    <group>
        <package path="D\W\Z\4\bcmwl5a.inf" />
        <package path="D\3\IN\A\Apfiltr.inf" />
        <suppressAddRemovePrograms />
    </group>
</dpInst>

Call it dpinst.xml and put it in the same folder as dpinst.exe with your drivers in the appropriate subfolders.


Sample code for a C# command-line tool that will create the above xml file and fill it with the list of .inf files found in subfolders:

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace BuildDrvList
{
    class Program
    {
        static void Main(string[] args)
        {
            StreamWriter outputFile = new StreamWriter("dpinst.xml");

            outputFile.WriteLine("<?xml version=\"1.0\"?>");
            outputFile.WriteLine("<dpInst>");
            outputFile.WriteLine("    <quietInstall />");
            outputFile.WriteLine("    <scanHardware />");
            outputFile.WriteLine("    <language code=\"0x0409\">");
            outputFile.WriteLine("        <dpinstTitle>Drivers Installer</dpinstTitle>");
            outputFile.WriteLine("    </language>");
            outputFile.WriteLine("    <group>");

            string[] arrInfFiles = System.IO.Directory.GetFiles(".", "*.inf", SearchOption.AllDirectories);
            foreach (string strFileName in arrInfFiles)
            {
                outputFile.WriteLine("        <package path=\"{0}\" />", strFileName.Substring(2, strFileName.Length -2));
            }

            outputFile.WriteLine("        <suppressAddRemovePrograms />");
            outputFile.WriteLine("    </group>");
            outputFile.WriteLine("</dpInst>");
            outputFile.Close();
        }
    }
}

Sorry I didn't have a quick way to put the .exe up anywhere. If you want to compile this tool, get Visual C# Express from Microsoft, it's free!