Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install driver by using C++

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

like image 816
user296359 Avatar asked May 05 '26 21:05

user296359


1 Answers

use function DiInstallDriver and DiInstallDevice

MSDN

like image 184
Mihir Mehta Avatar answered May 08 '26 11:05

Mihir Mehta



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!