Device Driver Installation Detection [newbie]

Posted: 01-04-2007, 03:29 PM
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
Reply With Quote

Responses to "Device Driver Installation Detection [newbie]"

Doron Holan [MS]
Guest
Posts: n/a
 
Re: Device Driver Installation Detection [newbie]
Posted: 01-05-2007, 05:34 AM
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

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"LEMAIRE Mathieu" <lemairm6@cti.ecp.fr> wrote in message
news:enj6hk$iai$1@guepard.ecp.fr...
> 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

Reply With Quote
LEMAIRE Mathieu
Guest
Posts: n/a
 
Re: Device Driver Installation Detection [newbie]
Posted: 01-05-2007, 07:59 AM
> 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
Reply With Quote
Doron Holan [MS]
Guest
Posts: n/a
 
Re: Device Driver Installation Detection [newbie]
Posted: 01-08-2007, 03:05 AM
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

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"LEMAIRE Mathieu" <lemairm6@cti.ecp.fr> wrote in message
news:enl0gm$7f9$1@guepard.ecp.fr...
>> 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

Reply With Quote
LEMAIRE Mathieu
Guest
Posts: n/a
 
Re: Device Driver Installation Detection [newbie]
Posted: 01-08-2007, 09:04 AM
> 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 !

--
Mathieu LEMAIRE
Reply With Quote
Doron Holan [MS]
Guest
Posts: n/a
 
Re: Device Driver Installation Detection [newbie]
Posted: 01-08-2007, 09:23 AM
why not report yourself as the std usb mass storage interface and just
forget about the manual installation aspect

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"LEMAIRE Mathieu" <lemairm6@cti.ecp.fr> wrote in message
news:ent1fr$k7o$1@guepard.ecp.fr...
>> 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 !
>
> --
> Mathieu LEMAIRE

Reply With Quote
 
LinkBack Thread Tools Display Modes
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem: Device driver software installation Harald Windows Vista Hardware & Devices 0 08-22-2006 04:49 PM
Driver installation for virtual IEEE1394 device using DIFx MiWi Windows XP Device Drivers 0 11-07-2005 10:27 AM
Device Driver Not Recognized on Hardware Installation Benjamin Windows XP Device Drivers 2 08-19-2004 07:53 PM
Device Manager Driver installation issue David Dowdell Windows XP Hardware 1 07-11-2003 03:17 AM
USB device detection Halie Windows XP Hardware 0 07-07-2003 08:07 PM