How to fix preinstalled driver on Windows 8.1

2019-08-05 11:33发布

Same situation as described in Preinstalling Driver on Windows 8.1 Fails. But is there a fix how to reinstall the same driver package (no guid change) without reinstalling 8.1?

Situation:

On a fresh Windows 8.1 installation (no upgrade from 8.0), our USB devices can't be installed. Behavior can be reproduce with a VM:

  1. create registry entries with class guid from inf file to show correct USB icon and create own group in device manager:

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{71f11c3d-6aaf-489e-ae80-f705496f1ec3}]
    "Icon"="-20"
    @="My Devices"
    "IconPath"="C:\\Windows\\system32\\setupapi.dll,-20"
    
  2. connect device

  3. manually install the driver in Device Manager with 'Browse my computer for driver software'. Click 'Install' when prompted for device software. Installation ends with:

    Error: Windows found driver software for your device, but encountered an error while attempting to install it.
    The system cannot find the file specified.
    

Report.wer says at the end:

FriendlyEventName=Could not install driver software
ConsentKey=PnPDriverImportError
AppName=Driver software installation
AppPath=C:\Windows\System32\mmc.exe
ReportDescription=Windows could not copy all of the files needed to install this device driver software. This sometimes happens when the driver software was not designed for this version of Windows.
ApplicationIdentity=00000000000000000000000000000000

ReportDescription does not make really sense, since the manual installation doesn't make any problems. A WHQL signed driver shows the same error.

If the registry is not modified (step 1), everything works fine.

Additional information:

  • The custom registry entries worked perfectly since XP including Windows 8.0.
  • Removing the 3 registry entries AFTER a device has been connected, but before trying to install the driver manually, doesn't work either. Looks like creating this registry entry and the detection of the USB device destroys something.
  • The cat file is signed, but the sys is not WHQL licensed
  • Windows 8.1 (x64, no upgrade from 8.0), didn't test on 32bit

Question

Skipping the registry modification in the installer is easy, but what is the fix for customers who unsuccessfully tried to install the drivers already? I found no way to enable the device without a fresh Windows installation!

1条回答
别忘想泡老子
2楼-- · 2019-08-05 12:19

The only fix I could find so fare:

- A restart might be required
- pnputil -e                             // to find buggy oemxx.inf files
- pnputil -d oemXX.inf                   // delete
- delete HKLM\SYSTEM\CurrentControlSet\Control\Class\{71f11c3d-6aaf-489e-ae80-f705496f1ec3}
- pnputil -i -a c:\pathToDriver\*.inf    // install and add to store

Not for end customers, but it works.

查看更多
登录 后发表回答