【问题标题】:Preinstalling Driver on Windows 8.1 Fails在 Windows 8.1 上预安装驱动程序失败
【发布时间】:2013-10-09 15:04:25
【问题描述】:

Microsoft's suggested procedures 之后,我们使用SetupCopyOEMInf 在Windows 的驱动程序商店中预安装了一些驱动程序包。这个过程多年来一直运作良好;在 XP、Vista、7 甚至 8 上都没有问题。

在评估 Windows 8.1 RTM 时,我们发现我们的驱动程序不再预安装。

查看setupapi.dev.log,发现:

!!!  sto:                Failed to query boot critical status of device class. Error = 0x00000002

及以后:

!!!  idb:                Failed to query inbox status of device class {ff646f80-8def-11d2-9449-00105a075f6b}. Error = 0x00000002
!!!  idb:                Failed to publish 'C:\Windows\System32\DriverStore\FileRepository\[ourinfname].inf_x86_3361fc76cd85b678\[ourinfname].inf'. Error = 0x00000002

我翻阅了文档,试图找出我们做错了什么。

使用 pnputil.exe -a 从命令行预安装或使用 InstallScript 的 DIFxDriverPackagePreinstall() 会产生相同的结果。

如果我们不尝试将驱动程序放在驱动程序存储中,驱动程序可以在 Windows 8.1 上运行。如果我们将已经安装了驱动程序的 Windows 8 机器升级到 Windows 8.1,预安装也可以工作。无论哪种情况,一旦它开始工作,它就会继续工作。

为什么在 Windows 8.1 上会失败?

【问题讨论】:

    标签: guid drivers windows-8.1 wdk inf


    【解决方案1】:

    经过两周的挖掘和调试,发现问题出在我们的设备类 GUID 上。

    在将我们的 INF 剥离到最低限度并与另一个在 Windows 8.1 上正确预安装的 INF 进行比较后,我意识到两者之间的唯一区别是类 GUID。我为ff646f80-8def-11d2-9449-00105a075f6b 做了一个快速的search 并找到了一千多个点击;不完全是您希望从 唯一 标识符中看到的内容。

    然后我回顾了 12 年的版本控制,发现最初负责创建我们的设备驱动程序的人并没有将向导生成的 INF 中的 GUID 从Win2K DDK

    创建一个新的唯一类 guid 解决了这个问题,并且我们的驱动程序已在 Windows 8.1 上正确预安装。

    我不知道 Microsoft 是否专门阻止使用该 GUID 进行预安装尝试,但底线是:如果示例说明要更改 GUID,更改它!

    这里是完整的示例代码。不要这样做:

    ;; *********  PLEASE READ ***********
    ;; The wizard cannot create exact INF files for all buses and device types.
    ;; You may have to make changes to this file in order to get your device to
    ;; install. In particular, hardware IDs and logical configurations require
    ;; intervention.
    ;;
    ;; The Win2K DDK documentation contains an excellent INF reference.
    
    ;--------- Version Section ---------------------------------------------------
    
    [Version]
    Signature="$Windows 95$"
    Provider=%ProviderName%
    
    ; If device fits one of the standard classes, use the name and GUID here,
    ; otherwise create your own device class and GUID as this example shows.
    
    Class=NewDeviceClass
    ClassGUID={ff646f80-8def-11d2-9449-00105a075f6b}
    

    【讨论】:

      【解决方案2】:

      我的previous answer 实际上有点像红鲱鱼。 虽然绝对不应该在示例 INF 中使用 GUID,但真正的问题最终出在我们的安装程序上。事实证明,我们的安装正在尝试为该类预先创建注册表项:

      HKLM\SYSTEM\CurrentControlSet\Control\Class\{FF646F80-8DEF-11D2-9449-00105A075F6B}
      

      从我们的安装程序中删除它解决了这个问题。

      微软一定改变了驱动程序预安装的工作方式,与以前的 Windows 版本相比。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2023-03-09
        • 2011-09-11
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2022-08-21
        • 1970-01-01
        相关资源
        最近更新 更多