Is there INFCACHE.1 file in Windows 8? Driver install error

Discussion in 'Windows 8' started by shel_lee, Mar 11, 2014.

  1. shel_lee

    shel_lee MDL Novice

    Dec 19, 2013
    4
    0
    0
    The INFCACHE.1 is usually located in the Windows directory:
    Windows XP: %systemroot%\inf
    Windows 7: %systemroot%\System32\DriverStore
    This INFCACHE.1 file seems to be used to store information about USB drivers,
    once the information in this file may have become corrupted and may cause windows to load the wrong driver
    or cause a driver not found message to be generated.
    Deleting this file will force windows to generate a new INFCACHE.1 file.
    But I cann't find it in Windows 8/8.1 now?
    if anyone could say me how to reaktive the search index too thanks
     
  2. Rock Hunter

    Rock Hunter MDL Senior Member

    Dec 6, 2011
    406
    99
    10
    I just searched my C: drive and no INFCACHE.1 file found. Windows 8.1 with Spring 2014.
     
  3. agent268

    agent268 MDL Junior Member

    Feb 20, 2012
    83
    24
    0
    The INFCACHE functionality was moved to a new DRIVERS registry hive file starting with Windows 8. It can be found under c:\windows\system32\config\drivers. If you delete this hive file, Windows will recreate it the next time you attempt to install a device just like INFCACHE.
     
  4. shel_lee

    shel_lee MDL Novice

    Dec 19, 2013
    4
    0
    0
    Thanks for your reply
    and I find a reg item as HKLM\Drivers while system is run at the first time
     
  5. agent268

    agent268 MDL Junior Member

    Feb 20, 2012
    83
    24
    0
    No problem on the insight and reply.

    I am not sure if your second line there is a statement or a question, so I will assume its both and provide some additional context on how the DRIVERS hive works.

    When Windows mounts the DRIVERS hive, it is mounted to a registry path of HKLM\Drivers. This mounting only occurs when Windows needs access to the information in said hive, so you will usually not see it very often when using Regedit. For example, Windows generally only mounts this hive when installing new hardware that it has detected and needs to consult the driver database that is stored in the DRIVERS hive.

    I hope that helps. If not, post up what's throwing you off and we can go from there.
     
  6. shel_lee

    shel_lee MDL Novice

    Dec 19, 2013
    4
    0
    0
    #6 shel_lee, Mar 14, 2014
    Last edited: Mar 14, 2014
    (OP)
    Here is my experience of finding INFCACHE.1 in Win 8.
    Share it to anyone who need it.

    = = = = = = = = = = Dividing line = = = = = = = = = =

    First, it's known that:
    In the legacy MS OS, such as win 2k(out of our discussion), xp and 2k3, even vista and 2008 (no r2)
    %systemroot%\inf\INFCACHE.1 is the driver cache file ( we can also think it as a driver index database).

    From win 7 to 2008 r2,
    The driver cache file is moved to the following directory, and some new files appeared.
    %systemroot%\System32\DriverStore\INFCACHE.1
    %systemroot%\System32\DriverStore\drvindex.dat
    %systemroot%\System32\DriverStore\infpub.dat
    %systemroot%\System32\DriverStore\infstor.dat
    %systemroot%\System32\DriverStore\infstrng.dat

    If these driver cache files is missing, corrupted or incorrect, those device based on the default drivers built-in system will not work properly.

    = = = = = = = = = = Dividing line = = = = = = = = = =

    From win 8 to the latest widows version,
    It seems that MS removed the driver cache which existed as files in the past.

    = = = = = = = = = = Dividing line = = = = = = = = = =

    We've spent some times, and it's not easy to find the new way MS store the driver cache msg in win 8, there has none MS offical explanation.
    After win 8.1 is released, we still insist on looking for the driver cache storage location,

    Misled by the old version of windows, we think the driver cache should exist as file format as before, and we get nothing from file comparison and tracking.
    Then we try to find a new ideas to get new progress, and try to search any helpful msg from MS or Search Engine.

    = = = = = = = = = = Dividing line = = = = = = = = = =

    Finally, one day I found someone said he believe it's functionality has been moved to the registry as HKLM\Drivers, and that the HIVE is loaded on demand.
    But I can not find this registry in my win 8.1 or win 8,

    After reinstall the os, at the first time while system is ready to use(System Initialization), Press [Shift]key + [F10]key to call the cmd wnd,
    Then run "regedit", okay! the HKLM\DRIVERS is exists here! Export it now.

    = = = = = = = = = = Dividing line = = = = = = = = = =

    Here to share its data structures:
    [HKEY_LOCAL_MACHINE\DRIVERS]
    There are 4 sub-items under HKLM\DRIVERS:
    [HKEY_LOCAL_MACHINE\DRIVERS\DriverDatabase\DeviceIds]
    [HKEY_LOCAL_MACHINE\DRIVERS\DriverDatabase\DriverFiles]
    [HKEY_LOCAL_MACHINE\DRIVERS\DriverDatabase\DriverInfFiles]
    [HKEY_LOCAL_MACHINE\DRIVERS\DriverDatabase\DriverPackages]

    I don't know why it will disappear soon.

    = = = = = = = = = = Dividing line = = = = = = = = = =

    And there also has a registry:
    [HKEY_LOCAL_MACHINE\DRIVERS\DriverDatabase]
    Which has the same data structures as HKLM\DRIVERS, but theirs content is different.
    [HKEY_LOCAL_MACHINE\DRIVERS\DriverDatabase\DeviceIds]
    [HKEY_LOCAL_MACHINE\DRIVERS\DriverDatabase\DriverFiles]
    [HKEY_LOCAL_MACHINE\DRIVERS\DriverDatabase\DriverInfFiles]
    [HKEY_LOCAL_MACHINE\DRIVERS\DriverDatabase\DriverPackages]
    So I export it too.

    = = = = = = = = = = Dividing line = = = = = = = = = =

    After gather the registry above, I heard someone told me there has another file exists in the OS:
    %systemroot%\system32\config\drivers
    Well, just extract it from the System Installation Disk now!

    = = = = = = = = = = Dividing line = = = = = = = = = =

    OK, let' make a summary now.

    The "%systemroot%\system32\config\drivers" can be extracted from System Disk easily, and the registry need to be exported at the System Initialization.
    After replace them to your OS, a sysrem reboot is needed to to take effect.
     
  7. agent268

    agent268 MDL Junior Member

    Feb 20, 2012
    83
    24
    0
    Thanks Shel_Lee for confirming some of the stuff I posted about earlier.

    With that being said, your second set of keys appear to be a repeat of your previous paragraphs statement and keys. At least, that's how it is written. I took a few minutes rereading it and wondered if you had a typo there and are trying to say that you found another copy of what is stored in the DRIVERS hive in another location in the registry. So I decided to re-dig in to the DRIVERS hive stuff since I haven't done so since Windows 8 launched.

    Anyways, I figured out what you meant to say at least from a Windows 8.1 perspective. There appears to be a copy of the DRIVERS hive stored in HKLM\System\DriverDatabase. While I haven't been able to confirm it's an exact copy, I can confirm that it is not just a mirrored view of the DRIVERS hive. So I am guessing that perhaps this key is updated during the boot process based on the current DRIVERS hive very similar to other subkeys in the SYSTEM hive. That's my running theory, but it might be updated while the OS is running as well.

    I was also able to re-confirm my statement that the DRIVERS hive is still loaded on demand. The best way to trigger it is to connect a new piece of hardware while you have regedit open. Refresh Regedit and you will see the DRIVERS hive gets mounted to HKLM\Drivers. Now it stays there until a few minutes after devices are installed. So there is some sort of "timeout" period before Windows unloads the hive. Most likely some part of the overarching Plug and Play Device Installation process.

    Below are screenshots showing this:
    Drivers Hive Not Loaded When No New Device is Connected.PNG
    Drivers Hive Loaded When Device is Connected.PNG

    With all that being said, I wanted to clarify and potentially correct some of the info you posted about. You mention that the DRIVERS hive is only used during initial Windows Setup. This is not true in my testing as well as I have posted and showed evidence on above. Like you mention, it is used during the Windows Setup process as installing devices and drivers is part of that process. So seeing it during the OOBE and OS system initialization phases of Windows Setup is normal behavior since Windows installs devices at those times and would need to consult the Drivers Database that is in the DRIVERS hive.

    I hope all the above info helps you and others in uncovering how this newish registry hive works.
     
  8. CEW

    CEW MDL Member

    Jan 21, 2011
    185
    101
    10
    #8 CEW, Mar 14, 2014
    Last edited: Mar 14, 2014
    I renamed the drivers hive. On reboot a new Drivers Hive is created. It is empty.

    Winpe won't load up with an empty drivers hive though.