Prev: printer driver install on Windows 7 x64
Next: What can cause error STATUS_DEVICE_POWER_FAILURE?
From: Maxim S. Shatskih on 5 Feb 2010 07:22 > OK, I've got the code for devcon, but did not find any command named "Enum" Sorry, devcon dp_enum The implementation scans c:\windows\inf for oem%d.inf files. -- Maxim S. Shatskih Windows DDK MVP maxim(a)storagecraft.com http://www.storagecraft.com
From: Mike [MSFT] on 10 Feb 2010 21:32 What's wrong with just passing SP_COPY_NOOVERWRITE to SetupCopyOEMInf? -Mike "JY" <sd(a)nospamgroup.com> wrote in message news:F85ED77F-6AD1-43EE-97EE-A7C708078EB2(a)microsoft.com... > Hi, > > I have an MFC application which needs to install a driver (I could use > SetupCopyOEMInf() or DriverPackageInstall() , etc), but I have to check if > it > is already installed, and proceed only if it isn't. How do I check this? > Is > there any API available for this? > > TIA, > JY
From: JY on 12 Feb 2010 05:41 "Mike [MSFT]" wrote: > What's wrong with just passing SP_COPY_NOOVERWRITE to SetupCopyOEMInf? > > -Mike I guess that would check for only 1 version of an installed driver/ only 1 ..inf file. I would like to check for any version of a driver installed for that device, not just a specific one. Regards, JY
From: Pavel A. on 12 Feb 2010 08:47 "JY" <sd(a)nospamgroup.com> wrote in message news:EF1DE005-3B5D-4584-A842-FDD8A2833398(a)microsoft.com... > > > "Mike [MSFT]" wrote: > >> What's wrong with just passing SP_COPY_NOOVERWRITE to SetupCopyOEMInf? >> >> -Mike > I guess that would check for only 1 version of an installed driver/ only 1 > .inf file. I would like to check for any version of a driver installed for > that device, not just a specific one. > Regards, Enumerate all devices of your bus type, and look for your hw id. Then get the device state - if there is some PnP problem, like device disabled, failed, etc - and details of the installed driver. --pa
From: Mike [MSFT] on 12 Feb 2010 16:15 You can enumerate all drivers using SetupDiBuildDriverInfoList and then look for yours. There's lots of ways to filter the list with that API; by setup class is probably ideal. You can also do like Maxim suggested and follow the "devcon DP_enum" example and scan %windir%\inf\ for oem*.inf files. However that isn't guaranteed to work after Win 7. -Mike "JY" <sd(a)nospamgroup.com> wrote in message news:EF1DE005-3B5D-4584-A842-FDD8A2833398(a)microsoft.com... > > > "Mike [MSFT]" wrote: > >> What's wrong with just passing SP_COPY_NOOVERWRITE to SetupCopyOEMInf? >> >> -Mike > I guess that would check for only 1 version of an installed driver/ only 1 > .inf file. I would like to check for any version of a driver installed for > that device, not just a specific one. > Regards, > JY >
First
|
Prev
|
Pages: 1 2 Prev: printer driver install on Windows 7 x64 Next: What can cause error STATUS_DEVICE_POWER_FAILURE? |