Device Driver Installation Detection [newbie]

  • Thread starter LEMAIRE Mathieu
  • Start date
L

LEMAIRE Mathieu

Hie,

I want to detect if a driver is installed on my PC using winAPI from a
C++ app. What is the simplest way to do that ?
Which GUID do I have to use (and where to find it ?), I only have my
device pid + vid eventually...

Sorry if my question seems stupid, I tried to understand how devices are
identified in MSDN doc, but it all seemed chinese to me :'( ...

Thank you,

Mathieu LEMAIRE
 
D

Doron Holan [MS]

the installation of the driver itself is not usually interesting, what is
interesting is the pnp devices it controls. anyways, you can use the
service control manager (SCM) to query for the service by name and get its
state if present. this will not tell you if it is loaded and running
though.

what are you going to do once you have detected the driver? open one of its
devices?

d
 
L

LEMAIRE Mathieu

the installation of the driver itself is not usually interesting, what is
interesting is the pnp devices it controls. anyways, you can use the
service control manager (SCM) to query for the service by name and get its
state if present. this will not tell you if it is loaded and running
though.

I want to detect whther a USB driver is installed or not. Does every USB
driver register services ?
what are you going to do once you have detected the driver? open one of its
devices?

OK, what I want to do is :
given descriptors of device (pid, vid....), check the installation
status of the driver (or compatible ones) and install the driver if none
is installed.

How is that possible with the windows api ?

Thank you,

LEMAIRE Mathieu
 
D

Doron Holan [MS]

this doesn't make much sense. instead you can iterate over the device tree,
find all the devices which have a problem code (no drivers installed), check
to see if the enumerator is "USB" and then do something about it. You can
get the descriptors from user mode, see usbview for details...

d
 
L

LEMAIRE Mathieu

this doesn't make much sense. instead you can iterate over the device tree,
find all the devices which have a problem code (no drivers installed), check
to see if the enumerator is "USB" and then do something about it. You can
get the descriptors from user mode, see usbview for details...

No, I can't connect the device. I will go deeper in details : It's a
project I do for my school - i want to do a hardware interface between a
device and the host that :
- detects whether the device is installed (without connecting the device
itself - to make it the least intrusive)
- install driver if necessary (harware interface ~= mass storage)
- and only then connect the device

Any suggestion to do the first part ?
Or any commentary/advice on the project ?

Thank you very much !
 
D

Doron Holan [MS]

why not report yourself as the std usb mass storage interface and just
forget about the manual installation aspect

d
 
L

LEMAIRE Mathieu

why not report yourself as the std usb mass storage interface and just
forget about the manual installation aspect

?? I don't understand

I have a .inf describing my device driver and I want to check if it's
already installed or preinstalled... Is it that complicated to do this
in with winApi ??

Mathieu LEMAIRE
[/QUOTE]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top