How to install a driver using SetupInstallFromInfSection?

Hi All,

I have a minifilter driver and I am using INF file to install it. I am installing it through commandline to rundll32.exe.

I want to install it programatically. Can it be done using SetupInstallFromInfSection()? If yes how to do it. My doughts are not getting cleared with MSDN .

Thanks & Regards,
Amit.

"Alternatively, your program may call InstallHinfSection, InstallHinfSectionA, or InstallHinfSectionW directly, setting the CmdLineBuffer parameter to the following.

“ ”

Where path is the full path to the .inf file, mode is the reboot mode parameter, and section is any Install section in the .inf file. The comma separator between SETUPAPI.DLL and InstallHinfSection on the command line is required. Note that there cannot be any white space on the command line between the comma and SETUPAPI.DLL or InstallHinfSection."

Setup api documentation from the MSDN platform sdk docs.

That seems pretty clear to me. Either use rundll32 from a batch file or follow the simple instructions to call InstallHinfSection programmatically.

> -----Original Message-----
> From: xxxxx@lists.osr.com [mailto:bounce-299195-
> xxxxx@lists.osr.com] On Behalf Of xxxxx@yahoo.com
> Sent: Monday, September 03, 2007 7:28 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] How to install a driver using
> SetupInstallFromInfSection?
>
> Hi All,
>
> I have a minifilter driver and I am using INF file to install it. I am
> installing it through commandline to rundll32.exe.
>
> I want to install it programatically. Can it be done using
> SetupInstallFromInfSection()? If yes how to do it. My doughts are not
> getting cleared with MSDN .
>
> Thanks & Regards,
> Amit.
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer