Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTFSD
Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


Writing an installer for my driver

sweetssweets Member Posts: 2

The driver I'm working on is planned to be released alongside some software that it's been made for, and we would like to have the driver be installed alongside it and run at startup.
I'm currently having a difficult time finding resources related to installing drivers through software. Any resources or explanations would be greatly appreciated, thanks

Comments

  • rod_widdowsonrod_widdowson Member - All Emails Posts: 1,131

    Good question.
     
    Microsoft has provided no feedback on how this is to be done since they started deprecating DIFXAPP. AIUI, there is some sort of idea that minifilters will beinstalled as Apps, but I don't yet understand/see how that is going to work.
     
    Although it goes against the grain to suggestion using a deprecated subsystem, I would nonetheless suggest that you look at the <difx:Driver> element in WiX (which would be my recommendation for writing an installer). Documentation here.
     
    Another solution I have seen is to use QTEXEC or similar to do a Rundll blabla,InstallHinfSection bla bla. This is pretty sucky but remains sort of supported (for as long as you can right click on inf files to install). Checkout lines 120 and beyond on the OpenAFS installer

  • Sourabh_ArvikarSourabh_Arvikar Member Posts: 75

    @sweets, are you trying to install driver programmatically? or looking any other way.

    To install programmatically please look into https://docs.microsoft.com/en-us/windows/desktop/api/setupapi/nf-setupapi-installhinfsectionw

    code example will be look like:

    InstallHinfSection(NULL, NULL, L"DefaultInstall 128 <driver INF file path>", 0);

  • sweetssweets Member Posts: 2

    @Sourabh_Arvikar Yes, that is what I am trying to do, Thank you very much!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 15 Jun 2020 LIVE ONLINE
Writing WDF Drivers 22 June 2020 LIVE ONLINE
Internals & Software Drivers 28 Sept 2020 Dulles, VA