Jump to content

Mertsch

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by Mertsch

  1. Hello,

     

    just yesterday I wondered why my Windows partition is running out of free space while not storing any additional data. I quickly fired up SpaceMonger and searched for space eaters.

    I quickly identified the C:\Windows\System32\DriverStore to eat up a huge chunk of HD space.

     

    What is the Windows driver store?

     

    Starting with Windows Vista, the driver store is a trusted collection of inbox and third-party driver packages. The operating system maintains this collection in a secure location on the local hard disk. Only the driver packages in the driver store can be installed for a device.

     

    When a driver package is copied to the driver store, all of its files are copied. This includes the INF file and all files that are referenced by the INF file. All files that are in the driver package are considered critical to the device installation. The INF file must reference all of the required files for device installation so that they are present in the driver store. If the INF file references a file that is not included in the driver package, the driver package is not copied to the store.

     

     

    browsing through the files I realised that 80% of the space required was related to stored nVidia drivers. Each version of a driver package took about 150+MB which quickly added up to 1.75GB for storing OLD drivers.

     

    Since I am logged in as administrator I decided to just delete those directories. I was unable to do so, because its a SYSTEM folder. If you do a quick google search you will find that you can either take ownership of those directories and delete them the dirty way or you can use a Microsoft tool.

     

    pnputil -e

    PnPUtil lists all the installed 3rd party drivers.

     

    e.g.

    Published name : oem43.inf

    Driver package provider : NVIDIA

    Class : Display adapters

    Driver date and version : 07/09/2010 8.17.12.5896

    Signer name : Microsoft Windows Hardware Compatibility Publisher

     

    Since my system is already cleaned up I can't show you multiple entries. But the scheme is simple:

    Each .inf file represents a driver (unordered). It starts at 1 (no preceding zeros) and ends at whatever amount of 3rd party driver you have installed.

     

    How can you cleanup those space eaters?

    Simple!

     

    pnputil -d oem<OEMDriverNumber>.inf

     

    /dRemoves a driver package from the driver store. The PublishedInfFileName parameter specifies the published name of the INF file for the driver package that was added to the driver store. For more information about this parameter, see the Comments section later in this topic.

     

    The /d switch has the following optional parameters:

     

    /fForces the deletion of the specified driver package from the driver store. You must use this parameter if the specified driver package is installed on a device that is connected to the system. If this parameter is not specified, PnPUtil only removes a driver package if it was not used to install drivers for devices that are connected to the system.

     

    Note Removing the driver package in this manner will not affect the operation of currently connected devices for which drivers were previously installed from the package.

     

     

    How should CCleaner support this mechanism?

     

    Working with the PNPUtil is a pain. There is absolutely no batch processing or cleanup mechanism.

     

    1. It would be great if CCleaner could support the user by calling PnPUtil with "-e" and parse the resulting list into a data grid, so the user can get a quick overview on which drivers are stored (ideally with size - which is not reported by PnPUtil).

    2. Let the user select any number of drivers and send the remove command for those. Note: Unless you specify the "/f" command you can NOT remove driver currently in use and thus affect your system in a negative way.

     

    Thanks for CCleaner!

     

    Thanks for reading,

    Mertsch

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.