views:

192

answers:

2

Hi,

This is a question about installing driver. I have the following files :

aaa.cat aaa.inf x86\ttt.sys

I can install this driver by clicking "update driver" in device manager. But now I need to install this driver on Windows (XP, Vista and Win7) by using C++. How could I do this?

On the other hand, I can't use install shield or other tool to do the job. That is why I am asking this question.

Thanks in advance.

I have found this page, which mentioned SetupInstallFile and SetupInstallFileEx functions. Is this the answer? http://msdn.microsoft.com/en-us/library/aa376958%28VS.85%29.aspx

+1  A: 

Do you have this book:

http://www.microsoft.com/mspress/books/index/6262.aspx

Programming the Microsoft® Windows® Driver Model, Second Edition by Walter Oney

It contains FASTINST example with source code, which installs a driver having its .inf file.

Alex Farber
A: 

use function DiInstallDriver and DiInstallDevice

MSDN

mihirpmehta