user296359
user296359

Reputation: 85

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

Upvotes: 3

Views: 5871

Answers (1)

Mihir Mehta
Mihir Mehta

Reputation: 13833

use function DiInstallDriver and DiInstallDevice

MSDN

Upvotes: 3

Related Questions