Jump to content

WMI Unattended (Auto detect and install driver)


Recommended Posts


First, sorry for my english ...

I created a tool to detect and launch driver's installation program in silent mode

It uses the WMI Technology that is use for network administrator

The basic rules are :

- The tool read the a XML file for getting some infos like

* some search keys (exemple : nVidia; GeForce)

* a WMI class to look in (exemple : Win32_VideoController)

* a setup path (exemple : %Systemdrive%\install\drivers\nvidia\setup.exe

* some arguments of the launching setup (exemple : /S)

- If the informations (search keys) are corresponding with the hardware detection,

it launch the setup. So it's cleary easy.

But the project was born from an idea and I'm not sure that is working for all,

so I need your tests to be efficient.

I made this tool cause i'm boring with all the modification to do on the 'unattended windows xp installation', simply the $OEM$\$1\Drivers doesn't work very well for the international language (apparently nice with english version)

And 9 times on 10 i must install (in manual) the nVidia or Ati drivers. That's stupid cause the hardware is well detected by windows.

A screenshot that's working with my Matrox G400 Dualhead


So if you are interested to help me

The beta can be downloaded from here:


You must install the framework .net 1.1 (so WMI Unattended can be launch just

after on your unattended XP CD/DVD), and so, it *normally* works from 98 to XP

without problems.

Edit config.XML to put good infos.

Don't hesitate to send me your config.XML if it's works nice.



Link to comment
Share on other sites

Off course this is a beta

and in the next version we can add :

- A GUI for editing the config.XML

- Some arguments for launching the app. (for unattended XP/CD)

- Support for others languages.

etc ...

Ideas are welcomed ...

Link to comment
Share on other sites

Hello, 1st of all I'm not shure this is the right place to post, on my understanding must be in the main Unattended Windows section while it's not directly related to wihu.

Anyway your project seem interresting on the hardware detection part. How did you do it ?

This could be a complement to wihu, to automaticaly install drivers with criterion not only based on reg key or files test.


Link to comment
Share on other sites

hey, sorry for the WIHU ... cause i'm new in the forum.

but the secret of the tool is that it uses the WMI classes from .NET

it's a standard for asking some informations of a machine in local or on a network.

It uses a SQL syntax like : "select * from win32_Video..."

Now it's was tested on the nvidia and ATI drivers but it can be uses for SOUND, MASS STORAGE, NETWORK CARD, or others devices (keybords, mouses, modems, etc ...)

I makes this because i detect that my geforce was not installed with the new 61.77 forceware, but with the last one, it was ... so that's make me fool.

I seek on the net and find some people who have the same troubles. The thing i never understant it's why it doesn't install even if it found the good hardware (ex for my case : it install the nvdia GeForce common driver given by Microsoft)

Good information for bad installation.

WMI unattended solve the problem.

But WMI is a completement from the OEMpnpdriverspath, not the only solution.

Link to comment
Share on other sites

I've used a similar method in the past but using vbscript. What I had been doing was using WMI to read BIOS information and based on what is enumerated, the script goes ahead and installs various drivers or helper apps specific to that model.

To explain a little bit clearer: I have several Compaq/HP laptops, models A, B, C (just to be easy). Anyone familiar with these brand of laptops knows that some of the driver and helper apps (one-touch buttons for example) don't generally install silently using an integrated driver method. And I also have experienced a problem with the Synaptics Touchpad drivers installing on desktop computers when they shouldn't using an integrated driver approach.

So I enumerate the BIOS and branch off from there. This sounds fairly similar.

Link to comment
Share on other sites

Honestly, I don't see much of a use for it. We already had came up with several (like a half dozen) easy methods that work reliably for detecting video card type to install proper drivers. One of them was using vbscript/WMI too... Noo need to maintain XML files or anything either.

If it did detect chipsets though then I'd definately use it (Not super hard to code, but it's a lot of work to maintain lists...)

Link to comment
Share on other sites

crahak : If you got something hard to detect, gives it to me keys, i will edit xml file to you, and test if it works well. If not, ... sorry it's not a good tool ;-)

But now it's a XML file, later, i will not, be replaces by a easy friendly user interface.


Link to comment
Share on other sites

Uh, my point is, I *don't* need it. And detecting very specific cards is an easy thing to do as well... I don't have anything to send. Interface or not, I think there's just too many easy ways to do it, like do we really need a 6th or 7th method for this? ...

Link to comment
Share on other sites

This is an example of getting the Pnp ID for a Matrox G400 DH:

Dim strComputer, objWMIService, propValue, SWBemlocator, colItems

strComputer = "."
Set SWBemlocator = CreateObject("WbemScripting.SWbemLocator")
Set objWMIService = SWBemlocator.ConnectServer(strComputer,"\root\CIMV2",UserName,Password)
Set colItems = objWMIService.ExecQuery("Select * from Win32_VideoController",,48)
For Each objItem in colItems
    WScript.Echo "PNPDeviceID: " & objItem.PNPDeviceID

You can create string variables for UserName and Password if you want to run this against a remote machine. And if you did want to do that, you would replace the strComputer = "." with strComputer = "Hostname".

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