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

Sept/Oct 2019 Issue of The NT Insider available

Download PDF here:

It’s a particularly BIG issue, too: 40 pages of technical goodness, ranging from WDF to Minifilters. Check it out.
Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

File replace dialog for driver installation

adnanadnan Member Posts: 169

Hi All,
How can we get rid of file replace dialog while installing drivers via co-installers. I tried overriding SPFILENOTIFY_TARGETNEWER but that messed up installation on server 2008. Now I tried INF file flags and did %DriverName%.sys,,,0x2. But that seems not working if there is a newer file already installed on target.
Could we completely get rid of the file replace dialog and the driver is installed without user intervention?


  • adnanadnan Member Posts: 169

    So I did find a solution for this. Instead of using

    SetupInstallFromInfSection(... SP_COPY_NEWER_OR_SAME | SP_COPY_NOSKIP,...)

    I used

    SetupInstallFromInfSection(... SP_COPY_NOSKIP,...)

    and it works fine now, doesn't give a replace dialog if I'm installing old drivers on top of newer ones.

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
Writing WDF Drivers 21 Oct 2019 OSR Seminar Space & ONLINE
Internals & Software Drivers 18 Nov 2019 Dulles, VA
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 27 Apr 2020 OSR Seminar Space & ONLINE