cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
paule2000
Level 3

How to install a device driver?

Hi group,

First of all: InstallShield 2008, InstallScript MSI Project.

My product will make use of some hardware and needs a device driver installed for that. The driver is provided by http://www.ftdichip.com and seems to be signed. It is a plug'n'play driver for a USB device.

The files of that driver package are:

  • ftd2xx.dll (DLL used by my application to access the device functionality)
  • ftdibus.cat (here seems to be the magic code making this driver signed)
  • ftdibus.sys (seems to be the actual driver)
  • ftdibus.inf (the famous .inf file)

I want the installer to completely install the driver without requiring the device plugged in and without running the hardware wizard if the device is plugged in afterwards.

My first attempt was to use the Device Driver Wizard. Up to now, I do not understand what is is actually doing. I give it the .inf file, it finds the three other files, creates two components out of it (one for the .inf file and one for the other three files).
If the installer runs, it copies all 4 files to the INSTALLDIR and thats apprently it. I expect that at least ftdibus.sys and ftdibus.dll are copied to the system32 folder of the PC (I don't know about ftdibus.cat).

Question: Can I make the device driver wizard to create something that actually installs the driver (in the system32 folder)?

My next attempt was to just create one component manually, put all 4 files inside and mark the component as device driver (via advanced settings). The only effect is that the installation fails and shows error -1603 (which doesn't make any statement about the problem). If I remove the driver component from the installer, the installation runs fine.

Question: What do I have to do to make the install engine not producing error -1603?

My last idea was to run DIFxDriverPackagePreinstall(...) after the installer copied all the files. Than, I read in the documentation that this function doesn't need to be called from an InstallScript MSI:
"This function applies to InstallScript projects only. This function is not required in InstallScript MSI projects since DIFx can be called by the Windows Installer in those projects."

Question: How do I tell InstallScript MSI projects to actually call DIFx?

Which brings me to the last question:

Question: Do I really have to deal with DIFx by Microsoft to add a driver installation to my project? Or is everything related to that already done by the driver vendor (which claims to provide a signed driver package)?

Thanks for your time and any ideas you have about it!

Regards,
Paul
Labels (1)
0 Kudos
(16) Replies
CChong
Level 11 Flexeran
Level 11 Flexeran

i have a same question......
0 Kudos
Holger_G
Level 10

You should note that DIFx supports installing Plug and Play (PnP) function drivers and class filter drivers.
What kind of hardware do you want to install?
0 Kudos
CChong
Level 11 Flexeran
Level 11 Flexeran

Thanks for your prompt reply.

let me state my question first,
USB device is wanted to be installed, its class is vendor-specified. what I use is 10.5, might I need to write a script for installing a driver? if a driver is installed, an application should be installed, might they be integrated into together? how to assign their installation sequence?
0 Kudos
Holger_G
Level 10

With regard to the driver installation:
So I assume that your USB device is a PnP function driver based device. This can be installed using DIFx.
Try the following:
Create a component (manually), put all driver package files inside, mark the .inf file as the key file and mark the component as a Device Driver.
I would also recommend to make use of the latest DIFx binaries (Version 2.10, supports Vista as well). Exchange all DIFxApp binaries in your IS 10.5 install directory (create backups before overwriting them) with the latest Version 2.10 (from the Vista WinDDK).
Do you have a signed driver package? If not you should also set the legacy flag for DIFx (I am not sure if 10.5 already supports setting that flag through the IDE, if not you can set the DIFx flags with the Direct Editor in the MsiDriverPackages table). Take a look at the DIFx documentation.
Install your setup and enable MSI logging.
0 Kudos
bdshan
Level 4

I have followed the steps posted, but the files are never copied to the system32\drivers folder. However, when I insert the device the install wizard pops up and I can point to location when the files are installed and it installs correctly.

How can I make my install install the driver files to system\32 drivers and have the OS think that the drivers have already been installed, ie: automatic installation?
0 Kudos
Holger_G
Level 10

bdshan wrote:
I have followed the steps posted, but the files are never copied to the system32\drivers folder. However, when I insert the device the install wizard pops up and I can point to location when the files are installed and it installs correctly.

How can I make my install install the driver files to system\32 drivers and have the OS think that the drivers have already been installed, ie: automatic installation?

DIFx for example preinstalls the driver package files into the driver store of Windows.
0 Kudos
bdshan
Level 4

Yes, I know what the documentation says it should do. But for me that is not the case, even in legacyMode. I think it is because my inf does not have an entry for a file catalog, nor was there a .cat file included with the driver files for the device.
0 Kudos
amarold
Level 5

Bumping an old thread, but I am having the exact same problems listed in the original post, except using my own drivers instead of 3rd party ones. Using IS2010, InstallScript MSI project.

If I use the device driver wizard, it puts the files on the target system, but doesn't do the driver install. If I create a component manually, and say it contains a device driver, I get error 1603.

Kind of at a loss as to what to do here, could really use some help.
Holger_G
Level 10

amarold wrote:
Bumping an old thread, but I am having the exact same problems listed in the original post, except using my own drivers instead of 3rd party ones. Using IS2010, InstallScript MSI project.

If I use the device driver wizard, it puts the files on the target system, but doesn't do the driver install. If I create a component manually, and say it contains a device driver, I get error 1603.

Kind of at a loss as to what to do here, could really use some help.


What type of hardware to you want to install with the driver package?
Which platforms do you target? On which OS do you test the installation?

Do the following to validate your driver package in first place:
-check the .inf file for errors using Chkinf
-try to install the driver package using DPInst.exe and check the result
(Chkinf and DPInst (DIFx) are included in Microsofts WDK, get the latest from here:http://www.microsoft.com/downloads/details.aspx?FamilyID=2105564e-1a9a-4bf4-8d74-ec5b52da3d00&displaylang=en)

If the driver package installs fine using DPInst.exe it should work as well with IS2010. I would recommend to create the driver component manually and adjust the Device Driver settings in the advanced settings of the component.

Post your results here.
0 Kudos
amarold
Level 5

There's no actual hardware, this is a virtual device driver. I'm currently trying to install it to an XP system (a vm if it matters, which is also the target environment for the driver).

ChkInf had two complaints, 1) no catalog file, 2) "device class" either obsolete or reserved for system use. The guid that was used is the one for non PNP devices from the table of system reserved guids. I asked one of the developers about this, but he didn't know why that one was picked, and the guy who might is on vacation.

DPInst when run in legacy mode to get around being unsigned completes, but says there are no device Ids found in inf file for current platform.

If I right click on the inf file and select Install, it happily copies the .sys file to system32/drivers, adds the registry entries, though I don't see the entry in the services panel (not sure if it should show up or not, the registry certainly thinks the service is installed).
0 Kudos
Holger_G
Level 10

DIFx does not support the installation of Virtual system devices by default.
I would recommend to use devcon.exe instead.
0 Kudos
Kelter
Level 10

From the MSDN page on devcon:
DevCon is not redistributable. It is provided for use as a debugging and development tool.


This doesn't sound like a recommended way to handle device installations, virtual or otherwise.

I'm trying to install a virtual device driver as a service, but the service installation component wizard doesn't allow me to specify service type 1 (SERVICE_KERNEL_DRIVER). We don't have a .inf file (and don't need one because there's no device) so the driver install wizard isn't going to help us.

The problem seems to be that the service configurations stuff doesn't give us the options that we need. can i just tweak the direct editor? what's recommended for this situation?
0 Kudos
Kelter
Level 10

Perhaps this thread is the proper thread for my problem:

http://community.flexerasoftware.com/showthread.php?t=173598
0 Kudos
fardeen
Level 2

Hi, You need the driver made for your specific motherboard, find it on the motherboard maker’s site.
This is the one problem that can often actually be fixed by registry sweeping utilities (such as CCleaner). At least, the most common cause of this problem can be.

Most often, a code 10 occurs because some program installed a "filter driver" for the device. Then the program was uninstalled, but it left the filter driver in the registry. This sometimes happens with CD/DVD software such as Nero. A registry sweeper will remove the incorrect entry.

The other possibility is a power management conflict. This sometimes happens on laptops that have many other devices connected to their USB ports. If this computer is not a laptop and the device is not connected to a hub, this is almost definitely not the problem. Otherwise, you can try other USB ports or try disconnecting other USB devices. I think you will agree with me.

Thanks!!!

msdscompliance
0 Kudos
Tim_Mayert
Level 9

We are using the DPInst.exe to install our drivers through custom actions and command lines and we just noticed an issue.

Our drivers do seem to get installed, but if we set our custom actions to return the error return code then our install will crash with a 1722 error message and perform a rollback.

We are using the /S /SA /F flags on the command line and therefore we removed the /S so that it was no longer silent and it brought up the DPInst.exe UI and seemed to install the driver fine, but when we click on the finish button of the DPInst UI dialog box the install would still crash with the 1722 error.

So does this app simply not return the correct exit code and therefore MSI install figure that the app did not work correctly, or does this app actually fail in some way after the drivers have been installed and therefore its exit code is an error that the install catches?
0 Kudos
nps-at
Level 2

hi tim,

we've got exactly the same problem.
do you know if there is any solution until now?


this happens with devcon.exe too.


i'll try to encapsulate the calls to dpinst and devcon.exe with another small script/program. do you know which return values there have to be, that the msi installer recognizes it as successful? or is there an option to simply turn the checking off?

-- daniel.
0 Kudos