MSFN Forum: Compal driver installer - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Compal driver installer detect and install silently Rate Topic: -----

#1 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 7,349
  • Joined: 28-April 06
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 02 August 2011 - 01:38 PM

I found a pretty neat program that detects hardware and can install the appropriate driver package. I could tell that was what it did but then I found it could pass installer switches. The only possible issue is that it runs this concurrently, which we know could be a potential problem in the making. However for the small amount of work I wanted it to do (I didn't expect it to work tbh) it works just fine.

It appears that Compal has written a setup.exe which reads data from an INI, then runs the appropriate command once it finds a HwID from the list. Your keyword here is "dedrvldr" which doesn't return much usefull in Google except a bunch of non-English lenovo websites. You can get this EXE and INI from Lenovo's Windows 7 Camera driver.

http://consumersuppo...ategoryID=35057

Extract the IN1CAM10WW5.exe with WinRar or 7zip.

Here is an example of the cmdrvldr.ini which I used to install WLAN and BT:

[DeDrvLdrInfo]
    VendorCount	 = 2

[VendorInfo1]
    Interface        = USB
    VenName	     = Motorola
    VenID	     = Vid_0A12
    PID		     = Pid_0001
    SetupFileRootDir = \Motorola\V3.0.12.285 (Logo)
    SetupFileName    = BluetoothSetup.exe /VERYSILENT /SUPPRESSMSGBOXES

[VendorInfo2]
    Interface        = PCI
    VenName	     = Realtek 8188CE
    VenID	     = Ven_10EC
    DevID            = Dev_8176
    Subsys           = Subsys_917610EC
    SetupFileRootDir = \Realtek RTL8188CE\V1005.8.1101.2010 (Logo)
    SetupFileName    = Setup.exe /S /v/qn


So using this program will let you do a wide-range of hardware detection, or use it to install multiple things like I have.
Also, I checked the actual program (CmDrvLdr.exe) real quick (honestly I didn't try too hard) and it doesn't seem to use switches. In fact, when I did a test of

CmDrvLdr.exe /?


it did install both programs but then rebooted the system.


#2 User is offline   CoffeeFiend 

  • Coffee Aficionado
  • Group: Super Moderator
  • Posts: 5,260
  • Joined: 14-July 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 02 August 2011 - 08:04 PM

I haven't looked at the app but building something like this from scratch should be pretty simple using the well documented Setup API:
-Call SetupDiGetClassDevs with Flags = DIGCF_PRESENT | DIGCF_ALLCLASSES (you can also specify if you want just USB or just PCI devices or whatever, if that suits your needs better)
-if it doesn't return INVALID_HANDLE_VALUE, then use SetupDiEnumDeviceInfo with the returned handle to enumerate the devices (incrementing the index with each pass)
-if that call succeeds, use SetupDiGetDeviceRegistryProperty with Property = SPDRP_HARDWAREID to get a Hardware ID from it (or SPDRP_FRIENDLYNAME would get you names and so on)
-it would be possible to then call SetupDiGetDeviceRegistryProperty with Property = SPDRP_INSTALL_STATE to get its DEVICE_INSTALL_STATE (if drivers are already installed) and filter based on that (only install drivers for what isn't working)

Once you have these Hardware IDs (same as you'd see in device manager), it's fairly trivial to match that with a text or XML file (especially with LINQ), and if it matches, then run the command line contained in the said text or XML file.

Alternately, if someone just wanted to check for which video driver to install, then you could simply call EnumDisplayDevices to get the same info, along with some filtering (making sure DISPLAY_DEVICE_MIRRORING_DRIVER isn't set, etc)

It would take perhaps an hour to write this in C# from scratch (or about 15 mins for the video-only version). The only thing is, you're probably using this from WinPE so that wouldn't be of any help for you... And I'm not going to write that in C++ as then it's not exactly an hour long project anymore (at least not for me!)

#3 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 7,349
  • Joined: 28-April 06
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 03 August 2011 - 08:33 AM

No definately not in WinPE.... But people could use this as a quick and easy way to install drivers in their unattends.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy