PC Review


Reply
Thread Tools Rate Thread

Device Driver Installation Detection [newbie]

 
 
LEMAIRE Mathieu
Guest
Posts: n/a
 
      4th Jan 2007
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
 
 
 
 
Doron Holan [MS]
Guest
Posts: n/a
 
      5th Jan 2007
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" <(E-Mail Removed)> wrote in message
news:enj6hk$iai$(E-Mail Removed)...
> 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
 
      5th Jan 2007
> 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
 
      8th Jan 2007
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" <(E-Mail Removed)> wrote in message
news:enl0gm$7f9$(E-Mail Removed)...
>> 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
 
      8th Jan 2007
> 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
 
      8th Jan 2007
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" <(E-Mail Removed)> wrote in message
news:ent1fr$k7o$(E-Mail Removed)...
>> 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
 
LEMAIRE Mathieu
Guest
Posts: n/a
 
      10th Jan 2007
> 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

--

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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not 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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
USB device found, installation failed becasue a function driver was not specified for this device instrance jywu1@hotmail.com Microsoft Windows 2000 2 2nd Feb 2006 02:00 AM
USB device found, installation failed becasue a function driver was not specified for this device instrance jywu1@hotmail.com Microsoft Windows 2000 Hardware 2 2nd Feb 2006 02:00 AM
ERROR_NO_SYSTEM_RESOURCES during device driver installation Lothar Brendel Windows XP Help 2 24th Jan 2005 12:33 AM
USB device auto driver detection DH Windows XP Hardware 0 8th Dec 2003 11:41 PM
re-installation of device driver Sean Windows XP General 2 16th Nov 2003 10:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:26 AM.