How to fix preinstalled driver on Windows 8.1

北慕城南 提交于 2019-12-11 10:34:29

问题


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:


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.



来源:https://stackoverflow.com/questions/21280710/how-to-fix-preinstalled-driver-on-windows-8-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!