How to install device driver automatically

  • Thread starter Thread starter R.D.
  • Start date Start date
R

R.D.

Hello, we have device driver (*.SYS) for some special device.
It can be installed by user manually, if the user choses "Add New
Hardware..."
wizard.
But we want to be able to install it automatically from within our program.
We also hae an INI file.
How can we install this driver from within our software, WITHOUT user
intervention?

Thank you.
 
R.D. said:
How can we install this driver from within our software, WITHOUT user
intervention?

ShellExecute the INF file. But user have to plug in the physical device
anyway. Also note that writing installers for device drivers is against MS
guidelines.

-Kirk
 
Uhm thanks... and is that enought? Just ShellExecute? And NO question for
user will popup?
Just all the devices will get installed at once?
About MS guidelines - its just to make work easy for clients - some of them
dont know what
Device Driver means. It would be fare if they just execute a program that
would do all the job for them.

Thanks.
 
R.D. said:
And NO question for user will popup?
If the driver is signed.
Just all the devices will get installed at once?
You might have more then one INF in that case.
About MS guidelines - its just to make work easy for clients - some of them
dont know what Device Driver means. It would be fare if they just execute
a program that would do all the job for them.
For customer it is much easier if software behaves consistently. That's why
those guidelines exist in the first place. It's really frustrating that
there are so many incompatible, inconsistent and plain buggy installation
programs for drivers out there. The best thing you can do is to follow the
guidelines.

-Kirk
 
Hi R.D:

R.D. said:
Hello, we have device driver (*.SYS) for some special device.
It can be installed by user manually, if the user choses "Add New
Hardware..."
wizard.
But we want to be able to install it automatically from within our program.
We also hae an INI file.
How can we install this driver from within our software, WITHOUT user
intervention?

Thank you.


If it is a root-enumerated device, look at the install sample that comes
with the W2K DDK, if it is a device for which the hardware wizard pops
up, take a look at either SetupCopyOEMInf or at
UpdateDriverForPlugAndPlayDevices (from setupapi.dll). A good starting
point for the latter is the devcon sample that you find in the WXP DDK.
 
Actually, the install sample is out of date, look at DEVCON in the latest
DDK's for a much better sample of how to install a device in either case.
 
Kirk Ferdmann said:
ShellExecute the INF file. But user have to plug in the physical device
anyway. Also note that writing installers for device drivers is against MS
guidelines.

-Kirk

I am not familiar with ShellExecute.
Where can I find more information about it ?

Maurice
 
Just enter 'ShellExecute' in MSDN Library. If you don't have MSDN, it is
not optional, though much of it is available on the Microsoft web site.
 
Back
Top