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
Why can’t I add a vanilla gift card to my…
How do I add my apple gift card to wallet…
What Did Bimbo Airhead Reply When Asked
UPS Paketshop: Filialen & Standorte
Amc Near My Location
Craigslist Vans
Kaydengodly
Bucks County Job Requisitions
Pitt Authorized User
<i>1883</i>'s Isabel May Opens Up About the <i>Yellowstone</i> Prequel
Premier Boating Center Conroe
Sport Clip Hours
Diablo 3 Metascore
2016 Ford Fusion Belt Diagram
Mineral Wells Independent School District
Colorado mayor, police respond to Trump's claims that Venezuelan gang is 'taking over'
What Happened To Anna Citron Lansky
Locate At&T Store Near Me
Niche Crime Rate
Wgu Academy Phone Number
Project, Time & Expense Tracking Software for Business
Www.publicsurplus.com Motor Pool
Craigslist Battle Ground Washington
Valic Eremit
Hctc Speed Test
Arrest Gif
Jesus Revolution Showtimes Near Regal Stonecrest
Speedstepper
Free T33N Leaks
2004 Honda Odyssey Firing Order
Frank Vascellaro
Korg Forums :: View topic
Robot or human?
Does Iherb Accept Ebt
Western Gold Gateway
Vanessa West Tripod Jeffrey Dahmer
Bimmerpost version for Porsche forum?
How To Get Soul Reaper Knife In Critical Legends
Wsbtv Fish And Game Report
NHL training camps open with Swayman's status with the Bruins among the many questions
Dr Adj Redist Cadv Prin Amex Charge
Anhedönia Last Name Origin
Gasoline Prices At Sam's Club
Promo Code Blackout Bingo 2023
Shell Gas Stations Prices
Rs3 Nature Spirit Quick Guide
4k Movie, Streaming, Blu-Ray Disc, and Home Theater Product Reviews & News
Matt Brickman Wikipedia
Suzanne Olsen Swift River
Affidea ExpressCare - Affidea Ireland
Ravenna Greataxe
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.