Avoid Restarts During Device Installations and Driver Updates - Windows drivers (2024)

  • Article

To avoid system restarts during device installations, use the following rules:

Minimizing restarts when updating file-backed drivers

Prior to Windows10, all kernel-mode drivers were backed by the system's paging file. As a result, a driver binary could be overwritten on disk even while the driver was running.

To improve performance, starting with Windows10, most non-boot-start drivers are instead backed by the driver binary on disk.

Driver start types that are now file-backed include:

Boot start drivers continue to be backed by the paging file.

To update a file-backed driver, use the following best practices. Otherwise, the update might require two restarts, one to replace the file and a second to load the new version of the driver.

If you are using an INF file, follow these steps:

  1. Modify your driver INF file's CopyFiles section to use COPYFLG_IN_USE_RENAME, as follows:

    [MyDriver_Install.NT]CopyFiles=MyDriverCopy[MyDriverCopy]MyDriver.sys,,,0x00004000 ; COPYFLG_IN_USE_RENAME

    If you use this flag, Windows attempts to replace the driver file on disk. For more info, see INF CopyFiles Directive.

  2. If the INF is for a PnP driver, during device installation Windows attempts to unload the running driver and restart the devices that use it, in order to pick up the new version of the driver. If that fails, device installation indicates that the system should be rebooted.

  3. If the INF is not for a PnP driver and you are using a method such as InstallHInfSection to process the INF, then manually stop and restart the driver:

    • Close all open handles to the driver and then stop the driver using one of the following methods:

      • sc.exe stop <mydriver>

      • ControlService(SERVICE_CONTROL_STOP)

      For more information, see ControlService function.

If you are not using an INF file, use these steps:

  1. Stop the driver, as described above. Replace the old driver binary file with the new one.

  2. If you can't stop the driver, rename the existing file, copy the new file into place, and set up the existing file to be deleted in the future (for example, using MoveFileEx with the MOVEFILE_DELAY_UNTIL_REBOOT flag). In order to start using the new version of the driver, the system will need to be restarted.

File-Backed and Page-File-Backed Sections

What Determines When a Driver Is Loaded

Avoid Restarts During Device Installations and Driver Updates - Windows drivers (2024)
Top Articles
Design Your 10x Growth Strategy - Business Success Solution
Derivatives - Calculus, Meaning, Interpretation
Friskies Tender And Crunchy Recall
Ohio Houses With Land for Sale - 1,591 Properties
Walgreens Boots Alliance, Inc. (WBA) Stock Price, News, Quote & History - Yahoo Finance
Craigslist St. Paul
Txtvrfy Sheridan Wy
Top Financial Advisors in the U.S.
LA Times Studios Partners With ABC News on Randall Emmett Doc Amid #Scandoval Controversy
Ucf Event Calendar
Erin Kate Dolan Twitter
World History Kazwire
Athens Bucket List: 20 Best Things to Do in Athens, Greece
Oc Craiglsit
Dc Gas Login
Dr Adj Redist Cadv Prin Amex Charge
Tvtv.us Duluth Mn
Iu Spring Break 2024
Fraction Button On Ti-84 Plus Ce
Fort Mccoy Fire Map
Euro Style Scrub Caps
Food Universe Near Me Circular
Teen Vogue Video Series
Rust Belt Revival Auctions
Bòlèt Florida Midi 30
Understanding Gestalt Principles: Definition and Examples
Is Henry Dicarlo Leaving Ktla
Orange Park Dog Racing Results
What is Software Defined Networking (SDN)? - GeeksforGeeks
Rogold Extension
47 Orchid Varieties: Different Types of Orchids (With Pictures)
Soiza Grass
1400 Kg To Lb
404-459-1280
Giantess Feet Deviantart
Chris Provost Daughter Addie
Edict Of Force Poe
Hisense Ht5021Kp Manual
Can You Buy Pedialyte On Food Stamps
The Thing About ‘Dateline’
Check From Po Box 1111 Charlotte Nc 28201
Why I’m Joining Flipboard
Thelemagick Library - The New Comment to Liber AL vel Legis
Acts 16 Nkjv
Nu Carnival Scenes
Craigslist Binghamton Cars And Trucks By Owner
Eat Like A King Who's On A Budget Copypasta
15 Best Places to Visit in the Northeast During Summer
Sandra Sancc
Worland Wy Directions
Definition of WMT
Wayward Carbuncle Location
Latest Posts
Article information

Author: Pres. Carey Rath

Last Updated:

Views: 6173

Rating: 4 / 5 (41 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Pres. Carey Rath

Birthday: 1997-03-06

Address: 14955 Ledner Trail, East Rodrickfort, NE 85127-8369

Phone: +18682428114917

Job: National Technology Representative

Hobby: Sand art, Drama, Web surfing, Cycling, Brazilian jiu-jitsu, Leather crafting, Creative writing

Introduction: My name is Pres. Carey Rath, I am a faithful, funny, vast, joyous, lively, brave, glamorous person who loves writing and wants to share my knowledge and understanding with you.