Skip to content
⌘ NSIS Forum Archive

drivers install

10 posts

ramses123#

drivers install

hi,

could anybody please tell me how to proceed if i want to install drivers on e.g. WinXP and i have folowing files available:

- *.cat
- *.inf
- *.sys

the drivers should be preinstalled, so when the user attach the hardware to the laptop the drivers should be installed without user interaction. The installation is indicated in the ballon messages in the taskbar. Also the pre-installation procedure should be not visible for the user (only the progress on installation).

the more precise questions are:
- where to copy this files
- what registry keys must be set and how
- any other steps to do...

maybe an plug in that handle these steps automatically ?

thanks a lot !

br
ramsi
vc6#
Ramsi, I had a very similar question not long ago. You can read all about it here:

Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.


forums.winamp.com/showthread.php?s=&threadid=273261

Basically, it all boils down to using Microsoft's DPInst.

HTH,
Victor
vc6#
Another possibility, if you're in a hurry, is to use Microsoft's DevCon (devcon.exe).

You can read all about it here (and download it, too):

Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.

msdn2.microsoft.com/en-us/library/ms792824.aspx

The most useful commands for me are:

devcon install <hardwareid>
devcon install <.inffile> <hardwareid>


Good luck!
Victor
ramses123#
thanks a lot guys !
i will check this and will come back to you if something is going wrong 👍
ramses123#
after reading a lot about devcon and install drivers i assume that this issue is not a easy one.
it would be very helpful for me if you can post some code examples of how to integrate the devcon in the nsis (special call to @vc6).
and yes, it must work on W2K, XP and Vista (32/64bit)

thank you!
demiller9#
Before you get too deep into using Devcon, please note that Microsoft says it is not redistributable. (First sentence in 'More Information' here http://support.microsoft.com/kb/311272/ )
CancerFace#
If you got as far as SetupCopyOEMInf you have probably seen this thread and this wiki page. Between the two you can get an idea of what you need to come up with using the System plugin to call SetupCopyOEMInf and UpdateDriverForPlugAndPlayDevices to get your driver installed.

If you have an MSDN subscription you can download the windows driver kit (WDK) according to MS
It contains Devcon along with its source code. You can then look at the APIs used and either create a plugin for NSIS or use the System plugin to call those APIs.

Alternatively you can download the DDK (Windows Driver Development Kit) which also includes information about installing devices and drivers.

Also check my post on this thread. The Driver Install Frameworks Tools (which can be downloaded from this page) contains detailed description of the APIs needed to go through an installation of a device, but you would still need to translate those API calls to System plugin commands in NSIS (look for the documentation of DIFxAPI within the MSI file).

Hope this helps

CF