How to include INF driver install into VS Installer project

Roast picture Roast · Sep 7, 2010 · Viewed 9.6k times · Source

I use a Setup and Deploy project in Visual Studio 2008 to install my c# project.

I have a USB driver that i can manually install by right clicking the .inf file and choosing Install.

I think that if i had a .exe to install the driver, i could probably put it under Custom Actions. I'm not even sure where to start to make my own .exe, let alone if it would work.

I'm fairly new at this, having taught myself C# and learned how to make an installer through trial and error. I usually get by using trusty Google or this forum but i have trouble finding the information on my own this time.

Please help or point me in the right direction!

Answer

ewall picture ewall · Sep 8, 2010

You can use run devcon.exe from a custom action to perform in the installation.

Here is some sample code from the Windows Device Driver Kit demonstrating devcon.exe's APIs... but it's probably easier to use the command-line functions.