views:

128

answers:

2

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!

+1  A: 

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.

ewall
First off, thank you for your answer. I skimmed through both your links and downloaded the .exe. Not quite sure where to put in those command lines though... do you know how i can use devcon with my installer?
Lily
Sure... first you'd want to include DEVCON.EXE in your project's files if it is not found on the target system, then [create a Custom Action](http://msdn.microsoft.com/en-us/library/d9k65z2d%28VS.80%29.aspx) that runs the command-line to do the INF install. (Be sure to schedule the Custom Action to run *after* the files are installed!)
ewall
Ok, i tried this: Added devcon to custom actions/Commit. In arguments property i put "install ftdiport.inf" But i get a non-descriptive error during the installation. Will keep fiddling but if you see anything wrong with this can you let me know?
Lily
+1  A: 

Hi Lily,

I am working on exactly the same problem that you are working on. Please see my post: http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/89c996c4-881b-47f0-815d-cf14135daf88/

I will let you know as soon as mine working. Please let me know as soon as yours working.

Thanks,

Trammy

Trammy
Oh thank you Trammy, i'll keep an eye on your thread as well. :)
Lily