none
DriverPackageInstall tries to start to driver after install RRS feed

  • Question

  • I have a driver installing using DriverPackageInstall, this API tries to start to driver after install. I expect my driver should not try to start after install, it should start on next reboot.

    Any help will appreciated.

    Thanks,

    Sachin

    • Moved by Baron Bi Thursday, July 5, 2018 1:30 AM More related to driver development
    Wednesday, July 4, 2018 8:56 AM

All replies

  • Hi,

    thanks for posting here.

    This forum is about desktop application development with c++. For your case, I will move it to Windows hardware and driver development forum for better support.

    Your understanding and cooperation will be grateful.

    Best Regards,

    Baron Bi


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, July 5, 2018 1:29 AM
  • Why do you expect the driver not to start immediately? All other driver install patterns start the driver immediately. DriverPackagePreinstall may do what you want. What OS versions are you targeting with your difx installer? Note that difx has been out of support since win7.

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, July 5, 2018 6:10 AM
  • Our requirement is driver must start only at boot not on demand or install. Is there any way to specify to just install driver, do not start.
    Thursday, July 5, 2018 10:04 AM
  • What is the minimum os you are targeting? Why must it be at boot? Are you filtering boot stacks?

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, July 5, 2018 2:41 PM
  • We are targetting minimum Os verson Windows 8. We want to start at boot, not  neccessarily immidiate reboot, but our driver will be up when it tries to up when next boot up.

    Cant we just install driver in stopped state? Is there any way by using this API, or INF or any other option

    Thursday, July 5, 2018 4:49 PM
  • Typically a driver installed with an INF for Plug and Play will be running after the install.   What kind of driver is this?  The only drivers that can be installed stopped are legacy drivers, that don't interact with hardware or filter devices.  

    If you really don't want the driver to do anything unless it is boot time, you may be better off having a driver with a flag that makes it inactive. Use a volatile registry key when installing the driver that indicates this is an install, if the driver starts and sees the key it sets the inactive flag.  If it does not see the key, it creates the key, since I assume that a stop then start of the driver is also something you want to protect against.


    Don Burn Windows Driver Consulting Website: http://www.windrvr.com

    Thursday, July 5, 2018 5:18 PM
  • are you trying to install a pnp or legacy driver?

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, July 5, 2018 6:19 PM
  • > Our requirement is driver must start only at boot not on demand or install.

    Why?  The root of all the questions you've received here is that what you're describing is not normal.  Users will not expect it.  You should not challenge user expectations unless you have a very good reason.  What is your reason?  Saying "it is a requirement" is simply not enough.  As an engineer, you are supposed to challenge requirements that do not make sense, just as we are all doing here.


    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Thursday, July 5, 2018 8:33 PM
  • I like using FsRtlAreVolumeStartupApplicationsComplete to detect if the system has already booted or not. Makes life easier than trying to do a dance around a registry value.



    Scott Noone
    Engineering Partner
    OSR Open Systems Resources, Inc.
    Windows Driver Training, Consulting, Problem Analysis, and Custom Development
    http://www.osronline.com
    https://www.osr.com
    https://www.linkedin.com/in/scottnoone

    Friday, July 6, 2018 3:43 PM
  • Thanks All, I added registry check in DriverEntry and returned with failure, resulted adding error in eventlog.

    As this clear driver installation, I am trying to avoid eventlog error for installation.

    Friday, July 6, 2018 5:22 PM
  • As a workaround I have made driver disabled while install in INF file

    StartType      = 4      ; SERVICE_DISABLED

    and installed using API DriverInstallPackage, installed successfully bu when I checked driver using 

    sc qc mydriver, it shows some wrong path,

    BINARY_PATH_NAME   : \SystemRoot\\SystemRoot\system32\DRIVERS\myDriver.sys

    I am wondering tat how making SERVICE_DISABLED in INF file install caused corrupt sc qc.

    Thanks,

    Sachin

    Tuesday, July 24, 2018 12:54 PM
  • Post the inf.

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, July 24, 2018 1:56 PM